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

View File

@ -202,7 +202,7 @@ public class BattlePassActivity extends AbsActivity {
public void onSuccess(BattlePassUserInfoBean data) {
BattlePassActivity.this.data = data;
sessionView.setText(data.getBattlePassName());
timeView.setText(String.format("%s %s - %s",
timeView.setText(String.format("%s%s - %s",
WordUtil.getNewString(R.string.battlepass_user_time),
data.getStartTime(),
data.getEndTime()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -17,42 +17,56 @@
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/icon_live_record_play" />
<TextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="10dp"
android:text="每日簽到0/1\nnn123"
android:textColor="#F2F9FF"
android:textStyle="bold"
app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp"
app:autoSizeTextType="uniform"
android:maxLines="2"
app:layout_constraintEnd_toStartOf="@+id/submit"
app:layout_constraintStart_toEndOf="@+id/icon"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/content"
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:text="獎勵100經驗值/次\n123"
android:textColor="#F2F9FF"
android:textSize="12sp"
app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp"
app:autoSizeTextType="uniform"
android:maxLines="2"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:orientation="vertical"
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_constraintTop_toBottomOf="@+id/title" />
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"
app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="0.1sp"
app:autoSizeTextType="uniform"
app:layout_constraintEnd_toStartOf="@+id/submit"
app:layout_constraintStart_toEndOf="@+id/icon"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:maxLines="1"
android:text="獎勵100經驗值/次"
android:textColor="#F2F9FF"
android:textSize="12sp"
app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="0.1sp"
app:autoSizeTextType="uniform"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/submit"
app:layout_constraintStart_toEndOf="@+id/icon"
app:layout_constraintTop_toBottomOf="@+id/title" />
</LinearLayout>
<Button
android:id="@+id/submit"

View File

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

View File

@ -49,352 +49,385 @@
app:layout_constraintStart_toStartOf="@+id/reward_lv" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/reward_lv"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/tab_1_layout"
android:layout_width="73dp"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp">
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/tab_1_bg"
android:layout_width="match_parent"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/tab_1_layout"
android:layout_width="73dp"
android:layout_height="wrap_content"
android:src="@mipmap/bg_zl_battlepass_reward_item"
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
android:id="@+id/tab_1"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="12dp"
android:layout_marginBottom="14dp"
android:src="@mipmap/ic_integral"
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/tab_1_bg" />
<LinearLayout
android:id="@+id/tab_1_top_money_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:background="@mipmap/ic_zl_battlpas_exchange_top_subscript"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tab_1_top_money_text"
android:layout_width="wrap_content"
<ImageView
android:id="@+id/tab_1_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginBottom="1dp"
android:layout_marginEnd="1dp"
android:textColor="#fff"
android:textSize="11sp"
tools:text="10000" />
android:src="@mipmap/bg_zl_battlepass_reward_item"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/tab_1_top_money_icon"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginEnd="1dp"
android:src="@mipmap/gold_coin" />
</LinearLayout>
<ImageView
android:id="@+id/tab_1_unlock"
android:layout_width="match_parent"
android:layout_height="0dp"
android:src="@mipmap/bg_zl_battlepass_reward_item_unlock"
android:visibility="gone"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/tab_1_bg"/>
android:id="@+id/tab_1"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="12dp"
android:layout_marginBottom="14dp"
android:src="@mipmap/ic_integral"
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/tab_1_bg" />
<ImageView
android:id="@+id/tab_1_item_unlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
app:layout_constraintEnd_toEndOf="@id/tab_1_bg" />
<ImageView
android:id="@+id/tab_1_item_received"
android:layout_width="49.5dp"
android:layout_height="17dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_received"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
app:layout_constraintEnd_toEndOf="@id/tab_1_bg" />
<ImageView
android:id="@+id/tab_1_subscript"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:src="@mipmap/ic_zl_battlpas_exchange_subscript"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tab_1_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:maxLines="1"
android:text="甜蜜氣球\n&amp;積分30"
android:textColor="#0D21B2"
android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_1_bg" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/tab_2_layout"
android:layout_width="73dp"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp">
<ImageView
android:id="@+id/tab_2_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/bg_zl_battlepass_reward_item"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/tab_2"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="12dp"
android:layout_marginBottom="14dp"
android:src="@mipmap/ic_integral"
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/tab_2_bg" />
<LinearLayout
android:id="@+id/tab_2_top_money_layout"
android:layout_width="wrap_content"
android:layout_height="15dp"
android:layout_marginTop="4dp"
android:background="@mipmap/ic_zl_battlpas_exchange_top_subscript2"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tab_2_top_money_text"
<LinearLayout
android:id="@+id/tab_1_top_money_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginBottom="1dp"
android:layout_marginEnd="1dp"
android:textColor="#fff"
android:textSize="11sp"
tools:text="7天" />
android:layout_marginTop="4dp"
android:background="@mipmap/ic_zl_battlpas_exchange_top_subscript"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tab_1_top_money_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginEnd="1dp"
android:layout_marginBottom="1dp"
android:textColor="#fff"
android:textSize="11sp"
tools:text="10000" />
<ImageView
android:id="@+id/tab_1_top_money_icon"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginEnd="1dp"
android:src="@mipmap/gold_coin" />
</LinearLayout>
<ImageView
android:id="@+id/tab_2_top_money_icon"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginEnd="1dp"
android:id="@+id/tab_1_unlock"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:src="@mipmap/bg_zl_battlepass_reward_item_unlock"
android:visibility="gone"
android:src="@mipmap/diamond" />
</LinearLayout>
<ImageView
android:id="@+id/tab_2_unlock"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@mipmap/bg_zl_battlepass_reward_item_unlock"
android:visibility="gone"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/tab_2_bg" />
app:layout_constraintBottom_toBottomOf="@+id/tab_1_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/tab_2_item_unlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
app:layout_constraintEnd_toEndOf="@id/tab_2_bg" />
<ImageView
android:id="@+id/tab_1_item_unlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
app:layout_constraintEnd_toEndOf="@id/tab_1_bg" />
<ImageView
android:id="@+id/tab_2_item_received"
android:layout_width="49.5dp"
android:layout_height="17dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_received"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
app:layout_constraintEnd_toEndOf="@id/tab_2_bg" />
<ImageView
android:id="@+id/tab_2_subscript"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:src="@mipmap/ic_zl_battlpas_exchange_subscript2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/tab_1_item_received"
android:layout_width="49.5dp"
android:layout_height="17dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_received"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
app:layout_constraintEnd_toEndOf="@id/tab_1_bg" />
<TextView
android:id="@+id/tab_2_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:maxLines="1"
android:text="甜蜜氣球\n&amp;積分30"
android:textColor="#0D21B2"
android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_2_bg" />
<ImageView
android:id="@+id/tab_1_subscript"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_zl_battlpas_exchange_subscript"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tab_1_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:maxLines="1"
android:text="甜蜜氣球\n&amp;積分30"
android:textColor="#0D21B2"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_1_bg" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/tab_3_layout"
android:layout_width="73dp"
android:layout_height="wrap_content">
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/tab_3_bg"
android:layout_width="match_parent"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/tab_2_layout"
android:layout_width="73dp"
android:layout_height="wrap_content"
android:src="@mipmap/bg_zl_battlepass_reward_item"
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
android:id="@+id/tab_3"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="12dp"
android:layout_marginBottom="14dp"
android:src="@mipmap/ic_integral"
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/tab_3_bg" />
<LinearLayout
android:id="@+id/tab_3_top_money_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:background="@mipmap/ic_zl_battlpas_exchange_top_subscript"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tab_3_top_money_text"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="1dp"
android:layout_marginBottom="1dp"
android:textColor="#fff"
android:textSize="12sp"
tools:text="100000" />
<ImageView
android:id="@+id/tab_2_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/bg_zl_battlepass_reward_item"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/tab_3_top_money_icon"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginEnd="1dp"
android:src="@mipmap/diamond" />
</LinearLayout>
android:id="@+id/tab_2"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="12dp"
android:layout_marginBottom="14dp"
android:src="@mipmap/ic_integral"
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/tab_2_bg" />
<LinearLayout
android:id="@+id/tab_2_top_money_layout"
android:layout_width="wrap_content"
android:layout_height="15dp"
android:layout_marginTop="4dp"
android:background="@mipmap/ic_zl_battlpas_exchange_top_subscript2"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/tab_3_unlock"
android:background="@mipmap/bg_zl_battlepass_reward_item_unlock"
android:layout_width="match_parent"
android:layout_height="0dp"
android:visibility="visible"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/tab_3_bg"
/>
<TextView
android:id="@+id/tab_2_top_money_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="1dp"
android:layout_marginEnd="1dp"
android:layout_marginBottom="1dp"
android:textColor="#fff"
android:textSize="11sp"
tools:text="7天" />
<ImageView
android:id="@+id/tab_3_item_unlock"
android:layout_width="wrap_content"
android:layout_marginBottom="4dp"
tools:visibility="g"
android:layout_height="wrap_content"
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
app:layout_constraintEnd_toEndOf="@id/tab_3_bg" />
<ImageView
android:id="@+id/tab_2_top_money_icon"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginEnd="1dp"
android:src="@mipmap/diamond"
android:visibility="gone" />
</LinearLayout>
<ImageView
android:id="@+id/tab_3_item_received"
android:layout_width="49.5dp"
android:layout_height="17dp"
android:layout_marginBottom="5dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_received"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
app:layout_constraintEnd_toEndOf="@id/tab_3_bg" />
<ImageView
android:id="@+id/tab_2_unlock"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="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_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/tab_2_item_unlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
app:layout_constraintEnd_toEndOf="@id/tab_2_bg" />
<ImageView
android:id="@+id/tab_3_subscript"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:src="@mipmap/ic_zl_battlpas_exchange_subscript"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/tab_2_item_received"
android:layout_width="49.5dp"
android:layout_height="17dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_received"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
app:layout_constraintEnd_toEndOf="@id/tab_2_bg" />
<TextView
android:id="@+id/tab_3_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:maxLines="1"
android:text="甜蜜氣球\n&amp;積分30"
android:textColor="#0D21B2"
android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_3_bg" />
<ImageView
android:id="@+id/tab_2_subscript"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_zl_battlpas_exchange_subscript2"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tab_2_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:maxLines="1"
android:text="甜蜜氣球\n&amp;積分30"
android:textColor="#0D21B2"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_2_bg" />
</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
android:id="@+id/tab_3_layout"
android:layout_width="73dp"
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
android:id="@+id/tab_3_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/bg_zl_battlepass_reward_item"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/tab_3"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="12dp"
android:layout_marginBottom="14dp"
android:src="@mipmap/ic_integral"
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/tab_3_bg" />
<LinearLayout
android:id="@+id/tab_3_top_money_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:background="@mipmap/ic_zl_battlpas_exchange_top_subscript"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tab_3_top_money_text"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="1dp"
android:layout_marginBottom="1dp"
android:textColor="#fff"
android:textSize="12sp"
tools:text="100000" />
<ImageView
android:id="@+id/tab_3_top_money_icon"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginEnd="1dp"
android:src="@mipmap/diamond" />
</LinearLayout>
<ImageView
android:id="@+id/tab_3_unlock"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="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_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/tab_3_item_unlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
app:layout_constraintEnd_toEndOf="@id/tab_3_bg" />
<ImageView
android:id="@+id/tab_3_item_received"
android:layout_width="49.5dp"
android:layout_height="17dp"
android:layout_marginBottom="5dp"
android:src="@mipmap/ic_zl_battlepass_reward_item_received"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
app:layout_constraintEnd_toEndOf="@id/tab_3_bg" />
<ImageView
android:id="@+id/tab_3_subscript"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_zl_battlpas_exchange_subscript"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tab_3_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:maxLines="1"
android:text="甜蜜氣球\n&amp;積分30"
android:textColor="#0D21B2"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_3_bg" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

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

View File

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