战令相关UI调整

This commit is contained in:
zlzw 2024-01-26 13:42:38 +08:00
parent 0552f56eb4
commit f99641ed35
13 changed files with 521 additions and 367 deletions

View File

@ -0,0 +1,105 @@
package com.yunbao.common.views;
import android.content.Context;
import android.graphics.Paint;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.ViewTreeObserver;
import android.widget.TextView;
import com.yunbao.common.utils.StringUtil;
public class AutoSplitTextView extends androidx.appcompat.widget.AppCompatTextView {
private boolean mEnabled = true;
public AutoSplitTextView(Context context) {
super(context);
}
public AutoSplitTextView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public AutoSplitTextView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public void setAutoSplitEnabled(boolean enabled) {
mEnabled = enabled;
}
/* @Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.EXACTLY
&& MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.EXACTLY
&& getWidth() > 0
&& getHeight() > 0
&& mEnabled) {
String newText = autoSplitText(this);
if (!TextUtils.isEmpty(newText)) {
setText(newText);
}
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}*/
public void setAutoText(CharSequence text) {
this.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
//String[] split = text.toString().split("\n");
setText(text);
setText(autoSplitText(AutoSplitTextView.this, text));
/*setText("");
boolean test=false;
if(text.toString().startsWith("累計送出1000鑽石的礼物")){
test=true;
System.out.println("新字測試");
}
for (String s : split) {
if(StringUtil.isEmpty(getText().toString())){
setText(autoSplitText(AutoSplitTextView.this,s));
}else{
setText(getText() + "\n" + autoSplitText(AutoSplitTextView.this, s));
if(test)
System.out.println(getText());
}
}*/
AutoSplitTextView.this.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
});
}
private String autoSplitText(final TextView textView, CharSequence text) {
final String originalText = text.toString(); //原始文本
final Paint tvPaint = textView.getPaint();//获取TextView的Paint
final float tvWidth = textView.getWidth() - textView.getPaddingLeft() - textView.getPaddingRight(); //TextView的可用宽度
//将原始文本按行拆分
String[] originalTextLines = originalText.replaceAll("\r", "").split("\n");
StringBuilder newTextBuilder = new StringBuilder();
for (String originalTextLine : originalTextLines) {
//文本内容小于TextView宽度即不换行不作处理
if (tvPaint.measureText(originalTextLine) <= tvWidth) {
newTextBuilder.append(originalTextLine);
} else {
//如果整行宽度超过控件可用宽度则按字符测量在超过可用宽度的前一个字符处手动换行
float lineWidth = 0;
for (int i = 0; i != originalTextLine.length(); ++i) {
char charAt = originalTextLine.charAt(i);
lineWidth += tvPaint.measureText(String.valueOf(charAt));
if (lineWidth <= tvWidth) {
newTextBuilder.append(charAt);
} else {
//单行超过TextView可用宽度换行
newTextBuilder.append("\n");
lineWidth = 0;
--i;//该代码作用是将本轮循环回滚在新的一行重新循环判断该字符
}
}
}
}
return newTextBuilder.toString();
}
}

View File

@ -21,7 +21,7 @@
android:layout_width="150dp" android:layout_width="150dp"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginStart="23dp" android:layout_marginStart="23dp"
android:layout_marginTop="28dp" android:layout_marginTop="48dp"
android:background="@drawable/bg_live_sud_game_top_new" android:background="@drawable/bg_live_sud_game_top_new"
android:gravity="start|center_vertical"> android:gravity="start|center_vertical">
@ -69,10 +69,10 @@
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="98dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="end" android:layout_gravity="end"
android:layout_marginTop="29dp" android:layout_marginTop="49dp"
android:layout_marginEnd="20dp" android:layout_marginEnd="20dp"
android:gravity="center_vertical"> android:gravity="center_vertical">
@ -147,7 +147,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="70dp" android:layout_height="70dp"
android:layout_marginTop="75dp"> android:layout_marginTop="98dp">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/user_list" android:id="@+id/user_list"

View File

@ -3,6 +3,7 @@ package com.yunbao.main.adapter;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.graphics.Color; import android.graphics.Color;
import android.text.Html;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -11,6 +12,7 @@ import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@ -26,6 +28,7 @@ import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AutoSplitTextView;
import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.main.R; import com.yunbao.main.R;
@ -102,6 +105,9 @@ public class BattlePassMissionAdapter extends RecyclerView.Adapter<BattlePassMis
if (task.getId() == -1) { if (task.getId() == -1) {
title.setText(WordUtil.getNewString(R.string.battlepass_mission_line_title_daily)); title.setText(WordUtil.getNewString(R.string.battlepass_mission_line_title_daily));
} else if (task.getId() == -2) { } else if (task.getId() == -2) {
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) title.getLayoutParams();
params.topMargin=DpUtil.dp2px(20);
title.setLayoutParams(params);
title.setText(WordUtil.getNewString(R.string.battlepass_mission_line_title_season)); title.setText(WordUtil.getNewString(R.string.battlepass_mission_line_title_season));
} }
} }
@ -109,7 +115,7 @@ public class BattlePassMissionAdapter extends RecyclerView.Adapter<BattlePassMis
private class TypeOfMission extends VH { private class TypeOfMission extends VH {
ImageView icon; ImageView icon;
TextView title; AutoSplitTextView title;
TextView content; TextView content;
Button submit; Button submit;
@ -135,11 +141,11 @@ public class BattlePassMissionAdapter extends RecyclerView.Adapter<BattlePassMis
task.setNotReceivedTask(5); task.setNotReceivedTask(5);
}*/ }*/
if (task.getTaskSuccess() > 0) { if (task.getTaskSuccess() > 0) {
title.setText(String.format("%s(%s/%s)", String format = String.format("%s(%s/%s)",
task.getNameText(), task.getNameText(),
task.getUserTaskSuccess(), task.getUserTaskSuccess(),
task.getTaskSuccess()) task.getTaskSuccess());
); title.setAutoText(format);
} else { } else {
title.setText(task.getNameText()); title.setText(task.getNameText());
} }

View File

@ -21,7 +21,7 @@
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:orientation="vertical" android:orientation="vertical"
android:layout_marginTop="30dp" android:layout_marginTop="45dp"
android:layout_marginEnd="15dp" android:layout_marginEnd="15dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -6,7 +6,7 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:layout_marginTop="18dp" android:layout_marginTop="10dp"
android:layout_marginBottom="22dp" android:layout_marginBottom="22dp"
android:layout_marginStart="25dp" android:layout_marginStart="25dp"
android:layout_marginEnd="25dp" android:layout_marginEnd="25dp"

View File

@ -7,9 +7,10 @@
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:layout_marginEnd="15dp"
android:layout_marginStart="45dp" android:layout_marginStart="45dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:orientation="horizontal"> android:orientation="horizontal">
@ -18,10 +19,12 @@
android:id="@+id/tab_1" android:id="@+id/tab_1"
android:layout_width="90dp" android:layout_width="90dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_weight="1"
android:src="@mipmap/ic_reward_tab_normal" /> android:src="@mipmap/ic_reward_tab_normal" />
<ImageView <ImageView
android:id="@+id/tab_2" android:id="@+id/tab_2"
android:layout_weight="1"
android:layout_width="90dp" android:layout_width="90dp"
android:layout_height="40dp" android:layout_height="40dp"
android:src="@mipmap/ic_reward_tab_upgrade_unselect" /> android:src="@mipmap/ic_reward_tab_upgrade_unselect" />
@ -30,6 +33,7 @@
android:id="@+id/tab_3" android:id="@+id/tab_3"
android:layout_width="90dp" android:layout_width="90dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_weight="1"
android:src="@mipmap/ic_reward_tab_ultimate_unselect" /> android:src="@mipmap/ic_reward_tab_ultimate_unselect" />
</LinearLayout> </LinearLayout>
@ -38,8 +42,8 @@
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_marginEnd="10dp"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:layout_weight="1" android:layout_weight="1"
tools:listitem="@layout/item_battlepass_reward_type_top" /> tools:listitem="@layout/item_battlepass_reward_type_top" />

View File

@ -5,15 +5,13 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="100dp" android:layout_width="100dp"
android:gravity="center" android:gravity="center"
android:layout_height="200dp" android:layout_height="165dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp">
android:layout_marginTop="10dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/tab_1_layout" android:id="@+id/tab_1_layout"
android:layout_width="73dp" android:layout_width="73dp"
android:layout_height="75dp" android:layout_height="75dp"
android:layout_marginTop="5dp"
android:background="@mipmap/bg_zl_battlepass_reward_item" android:background="@mipmap/bg_zl_battlepass_reward_item"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -95,19 +93,17 @@
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="0dp" android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
tools:text="彩鑽之翼(92天)" tools:text="彩鑽之翼(92天)123"
android:gravity="center" android:gravity="center"
android:layout_gravity="center" android:layout_gravity="center"
android:textColor="#0D21B2" android:textColor="#0D21B2"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:maxLines="1"
android:maxLines="2"
app:autoSizeMaxTextSize="14sp" app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp" app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp" app:autoSizeStepGranularity="0.1sp"
app:autoSizeTextType="uniform" app:autoSizeTextType="uniform"
android:layout_marginStart="2dp" android:layout_marginStart="2dp"
android:layout_marginEnd="2dp" android:layout_marginEnd="2dp"
@ -119,7 +115,6 @@
android:id="@+id/content" android:id="@+id/content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/battlepass_integral" android:text="@string/battlepass_integral"
android:textColor="#CE2BFF" android:textColor="#CE2BFF"
android:textSize="13sp" android:textSize="13sp"
@ -131,7 +126,7 @@
android:id="@+id/submit" android:id="@+id/submit"
android:layout_width="65dp" android:layout_width="65dp"
android:layout_height="31dp" android:layout_height="31dp"
android:layout_marginTop="10dp" android:layout_marginTop="3dp"
android:autoSizeTextType="uniform" android:autoSizeTextType="uniform"
android:textAllCaps="false" android:textAllCaps="false"
android:background="@mipmap/bg_zl_battlepass_exchange_btn_exchange" android:background="@mipmap/bg_zl_battlepass_exchange_btn_exchange"

View File

@ -17,42 +17,56 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/icon_live_record_play" /> app:srcCompat="@mipmap/icon_live_record_play" />
<TextView <LinearLayout
android:id="@+id/title"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
android:layout_marginStart="8dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:text="每日簽到0/1\nnn123" android:layout_marginBottom="10dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/submit"
app:layout_constraintStart_toEndOf="@+id/icon"
app:layout_constraintTop_toTopOf="parent">
<com.yunbao.common.views.AutoSplitTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="8dp"
android:maxLines="2"
android:layout_weight="1"
android:text=" 观看直播10min0/1"
android:breakStrategy="simple"
android:hyphenationFrequency="none"
android:textColor="#F2F9FF" android:textColor="#F2F9FF"
android:textStyle="bold"
app:autoSizeMaxTextSize="14sp" app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp" app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp" app:autoSizeStepGranularity="0.1sp"
app:autoSizeTextType="uniform" app:autoSizeTextType="uniform"
android:maxLines="2"
app:layout_constraintEnd_toStartOf="@+id/submit" app:layout_constraintEnd_toStartOf="@+id/submit"
app:layout_constraintStart_toEndOf="@+id/icon" app:layout_constraintStart_toEndOf="@+id/icon"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/content" android:id="@+id/content"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:text="獎勵100經驗值/次\n123" android:maxLines="1"
android:text="獎勵100經驗值/次"
android:textColor="#F2F9FF" android:textColor="#F2F9FF"
android:textSize="12sp" android:textSize="12sp"
app:autoSizeMaxTextSize="14sp" app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp" app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp" app:autoSizeStepGranularity="0.1sp"
app:autoSizeTextType="uniform" app:autoSizeTextType="uniform"
android:maxLines="2"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/submit" app:layout_constraintEnd_toStartOf="@id/submit"
app:layout_constraintStart_toEndOf="@+id/icon" app:layout_constraintStart_toEndOf="@+id/icon"
app:layout_constraintTop_toBottomOf="@+id/title" /> app:layout_constraintTop_toBottomOf="@+id/title" />
</LinearLayout>
<Button <Button
android:id="@+id/submit" android:id="@+id/submit"

View File

@ -4,16 +4,14 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginTop="5dp"
android:text="@string/battlepass_mission_line_title_daily" android:text="@string/battlepass_mission_line_title_daily"
android:textColor="#0D21B2" android:textColor="#0D21B2"
android:textSize="16sp" android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View File

@ -49,18 +49,29 @@
app:layout_constraintStart_toStartOf="@+id/reward_lv" /> app:layout_constraintStart_toStartOf="@+id/reward_lv" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/reward_lv" app:layout_constraintStart_toEndOf="@+id/reward_lv"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/tab_1_layout" android:id="@+id/tab_1_layout"
android:layout_width="73dp" android:layout_width="73dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="15dp"> android:layout_marginEnd="15dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:id="@+id/tab_1_bg" android:id="@+id/tab_1_bg"
@ -100,8 +111,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="1dp" android:layout_marginStart="1dp"
android:layout_marginBottom="1dp"
android:layout_marginEnd="1dp" android:layout_marginEnd="1dp"
android:layout_marginBottom="1dp"
android:textColor="#fff" android:textColor="#fff"
android:textSize="11sp" android:textSize="11sp"
tools:text="10000" /> tools:text="10000" />
@ -113,23 +124,25 @@
android:layout_marginEnd="1dp" android:layout_marginEnd="1dp"
android:src="@mipmap/gold_coin" /> android:src="@mipmap/gold_coin" />
</LinearLayout> </LinearLayout>
<ImageView <ImageView
android:id="@+id/tab_1_unlock" android:id="@+id/tab_1_unlock"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:src="@mipmap/bg_zl_battlepass_reward_item_unlock"
android:visibility="gone"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:src="@mipmap/bg_zl_battlepass_reward_item_unlock"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/tab_1_bg"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toBottomOf="@+id/tab_1_bg"/>
<ImageView <ImageView
android:id="@+id/tab_1_item_unlock" android:id="@+id/tab_1_item_unlock"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock" android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg" app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
@ -143,12 +156,13 @@
android:visibility="visible" android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg" app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
app:layout_constraintEnd_toEndOf="@id/tab_1_bg" /> app:layout_constraintEnd_toEndOf="@id/tab_1_bg" />
<ImageView <ImageView
android:id="@+id/tab_1_subscript" android:id="@+id/tab_1_subscript"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:src="@mipmap/ic_zl_battlpas_exchange_subscript" android:src="@mipmap/ic_zl_battlpas_exchange_subscript"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -163,17 +177,26 @@
android:text="甜蜜氣球\n&amp;積分30" android:text="甜蜜氣球\n&amp;積分30"
android:textColor="#0D21B2" android:textColor="#0D21B2"
android:textSize="12sp" android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_1_bg" /> app:layout_constraintTop_toBottomOf="@+id/tab_1_bg" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/tab_2_layout" android:id="@+id/tab_2_layout"
android:layout_width="73dp" android:layout_width="73dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="15dp"> android:layout_marginEnd="15dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:id="@+id/tab_2_bg" android:id="@+id/tab_2_bg"
@ -195,6 +218,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/tab_2_bg" /> app:layout_constraintTop_toTopOf="@id/tab_2_bg" />
<LinearLayout <LinearLayout
android:id="@+id/tab_2_top_money_layout" android:id="@+id/tab_2_top_money_layout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -211,8 +235,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="1dp" android:layout_marginStart="1dp"
android:layout_marginBottom="1dp"
android:layout_marginEnd="1dp" android:layout_marginEnd="1dp"
android:layout_marginBottom="1dp"
android:textColor="#fff" android:textColor="#fff"
android:textSize="11sp" android:textSize="11sp"
tools:text="7天" /> tools:text="7天" />
@ -222,26 +246,28 @@
android:layout_width="10dp" android:layout_width="10dp"
android:layout_height="10dp" android:layout_height="10dp"
android:layout_marginEnd="1dp" android:layout_marginEnd="1dp"
android:visibility="gone" android:src="@mipmap/diamond"
android:src="@mipmap/diamond" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
<ImageView <ImageView
android:id="@+id/tab_2_unlock" android:id="@+id/tab_2_unlock"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@mipmap/bg_zl_battlepass_reward_item_unlock"
android:visibility="gone"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:background="@mipmap/bg_zl_battlepass_reward_item_unlock"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/tab_2_bg"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toBottomOf="@+id/tab_2_bg" />
<ImageView <ImageView
android:id="@+id/tab_2_item_unlock" android:id="@+id/tab_2_item_unlock"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock" android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
android:visibility="visible" android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg" app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
@ -255,12 +281,13 @@
android:visibility="visible" android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg" app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
app:layout_constraintEnd_toEndOf="@id/tab_2_bg" /> app:layout_constraintEnd_toEndOf="@id/tab_2_bg" />
<ImageView <ImageView
android:id="@+id/tab_2_subscript" android:id="@+id/tab_2_subscript"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:src="@mipmap/ic_zl_battlpas_exchange_subscript2" android:src="@mipmap/ic_zl_battlpas_exchange_subscript2"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -274,16 +301,25 @@
android:text="甜蜜氣球\n&amp;積分30" android:text="甜蜜氣球\n&amp;積分30"
android:textColor="#0D21B2" android:textColor="#0D21B2"
android:textSize="12sp" android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_2_bg" /> app:layout_constraintTop_toBottomOf="@+id/tab_2_bg" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/tab_3_layout" android:id="@+id/tab_3_layout"
android:layout_width="73dp" android:layout_width="73dp"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:id="@+id/tab_3_bg" android:id="@+id/tab_3_bg"
@ -338,24 +374,22 @@
<ImageView <ImageView
android:id="@+id/tab_3_unlock" android:id="@+id/tab_3_unlock"
android:background="@mipmap/bg_zl_battlepass_reward_item_unlock"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:visibility="visible"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:background="@mipmap/bg_zl_battlepass_reward_item_unlock"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@+id/tab_3_bg"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toBottomOf="@+id/tab_3_bg"
/>
<ImageView <ImageView
android:id="@+id/tab_3_item_unlock" android:id="@+id/tab_3_item_unlock"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginBottom="4dp"
tools:visibility="g"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock" android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg" app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
app:layout_constraintEnd_toEndOf="@id/tab_3_bg" /> app:layout_constraintEnd_toEndOf="@id/tab_3_bg" />
@ -375,8 +409,8 @@
android:id="@+id/tab_3_subscript" android:id="@+id/tab_3_subscript"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:src="@mipmap/ic_zl_battlpas_exchange_subscript" android:src="@mipmap/ic_zl_battlpas_exchange_subscript"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -390,11 +424,10 @@
android:text="甜蜜氣球\n&amp;積分30" android:text="甜蜜氣球\n&amp;積分30"
android:textColor="#0D21B2" android:textColor="#0D21B2"
android:textSize="12sp" android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_3_bg" /> app:layout_constraintTop_toBottomOf="@+id/tab_3_bg" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -116,7 +116,6 @@
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/integral" android:id="@+id/integral"
android:textStyle="bold"
android:text="@string/battlepass_user_my_integral" android:text="@string/battlepass_user_my_integral"
android:textColor="#442787" android:textColor="#442787"
android:textSize="14sp" android:textSize="14sp"

View File

@ -156,7 +156,7 @@
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible" /> tools:visibility="gone" />
<View <View
android:id="@+id/banner_click" android:id="@+id/banner_click"
@ -169,7 +169,7 @@
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible" /> tools:visibility="gone" />
<include <include
android:id="@+id/red_packet" android:id="@+id/red_packet"
@ -189,8 +189,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_above="@id/rt_main_tab" android:layout_above="@id/rt_main_tab"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginRight="8dp" android:layout_marginRight="25dp"
android:layout_marginBottom="10dp" /> />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"