修改守护列表页标签展示

This commit is contained in:
18401019693 2024-03-29 15:16:27 +08:00
parent 123b9dd74a
commit 4a4a52aa61
4 changed files with 50 additions and 32 deletions

View File

@ -38,6 +38,17 @@ public class GuardGetGuardUserInfoModel extends BaseModel {
private String userLanguage; private String userLanguage;
@SerializedName("live_language") @SerializedName("live_language")
private String liveLanguage; private String liveLanguage;
@SerializedName("is_open")
private String isOpen;
public String getIsOpen() {
return isOpen;
}
public GuardGetGuardUserInfoModel setIsOpen(String isOpen) {
this.isOpen = isOpen;
return this;
}
public String getUid() { public String getUid() {
return uid; return uid;

View File

@ -58,8 +58,7 @@
android:id="@+id/rewards_img1" android:id="@+id/rewards_img1"
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="80dp" android:layout_height="80dp"
android:scaleType="fitXY" android:scaleType="fitXY" />
android:src="@mipmap/tequan_1" />
<TextView <TextView
android:id="@+id/rewards_text1" android:id="@+id/rewards_text1"
@ -86,8 +85,7 @@
android:id="@+id/rewards_img2" android:id="@+id/rewards_img2"
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="80dp" android:layout_height="80dp"
android:scaleType="fitXY" android:scaleType="fitXY" />
android:src="@mipmap/tequan_1" />
<TextView <TextView
android:id="@+id/rewards_text2" android:id="@+id/rewards_text2"
@ -112,8 +110,7 @@
android:id="@+id/rewards_img3" android:id="@+id/rewards_img3"
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="80dp" android:layout_height="80dp"
android:scaleType="fitXY" android:scaleType="fitXY" />
android:src="@mipmap/tequan_1" />
<TextView <TextView
android:id="@+id/rewards_text3" android:id="@+id/rewards_text3"

View File

@ -2,6 +2,7 @@ package com.yunbao.live.dialog;
import android.content.Context; import android.content.Context;
import android.os.Bundle; import android.os.Bundle;
import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.FrameLayout; import android.widget.FrameLayout;
@ -199,39 +200,47 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
@Override @Override
public void onSuccess(GuardGetGuardUserInfoModel data) { public void onSuccess(GuardGetGuardUserInfoModel data) {
getGuardUserInfoModel = data; getGuardUserInfoModel = data;
if (data.getGuardType() == 0) { if (TextUtils.equals(data.getIsOpen(), "0")) {
guardianTask.setVisibility(GONE); guardianTask.setVisibility(GONE);
myGraudGrade.setVisibility(GONE); myGraudGrade.setVisibility(GONE);
btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard"); btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard");
guard_hint.setText(WordUtil.getNewString(R.string.guardian_for_your_favorite_anchor)); guard_hint.setText(WordUtil.getNewString(R.string.guardian_for_your_favorite_anchor));
} else { } else {
guardianTask.setVisibility(VISIBLE); if (data.getGuardType() == 0) {
myGraudGrade.setVisibility(VISIBLE); guardianTask.setVisibility(GONE);
btnGuardOpen.setText(WordUtil.isNewZh() ? "續費守護" : "Renewal Guard"); myGraudGrade.setVisibility(GONE);
StringBuffer stringBuffer = new StringBuffer(); btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard");
stringBuffer.append(WordUtil.isNewZh() ? "您是當前主播的" : "You are the current anchor's ") guard_hint.setText(WordUtil.getNewString(R.string.guardian_for_your_favorite_anchor));
.append(""); } else {
switch (data.getGuardType()) { guardianTask.setVisibility(VISIBLE);
case 1: myGraudGrade.setVisibility(VISIBLE);
stringBuffer.append(WordUtil.isNewZh() ? "星之守護" : "Star Guardian") btnGuardOpen.setText(WordUtil.isNewZh() ? "續費守護" : "Renewal Guard");
.append(""); StringBuffer stringBuffer = new StringBuffer();
guard_hint.setText(stringBuffer.toString()); stringBuffer.append(WordUtil.isNewZh() ? "您是當前主播的" : "You are the current anchor's ")
break; .append("");
case 2: switch (data.getGuardType()) {
stringBuffer.append(WordUtil.isNewZh() ? "王之守護" : "King Guardian") case 1:
.append(""); stringBuffer.append(WordUtil.isNewZh() ? "星之守護" : "Star Guardian")
guard_hint.setText(stringBuffer.toString()); .append("");
break; guard_hint.setText(stringBuffer.toString());
case 3: break;
stringBuffer.append(WordUtil.isNewZh() ? "神之守護" : "God Guardian") case 2:
.append(""); stringBuffer.append(WordUtil.isNewZh() ? "王之守護" : "King Guardian")
guard_hint.setText(stringBuffer.toString()); .append("");
break; guard_hint.setText(stringBuffer.toString());
default: break;
guard_hint.setText(WordUtil.getNewString(R.string.guardian_for_your_favorite_anchor)); case 3:
break; stringBuffer.append(WordUtil.isNewZh() ? "神之守護" : "God Guardian")
.append("");
guard_hint.setText(stringBuffer.toString());
break;
default:
guard_hint.setText(WordUtil.getNewString(R.string.guardian_for_your_favorite_anchor));
break;
}
} }
} }
if (data.getEndtime() == 0) { if (data.getEndtime() == 0) {
guard_time.setVisibility(GONE); guard_time.setVisibility(GONE);
} else { } else {

View File

@ -1105,6 +1105,7 @@ public class LiveGiftAnimPresenter {
ViewClicksAntiShake.clicksAntiShake(mIvLookBuyGuardNew, new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(mIvLookBuyGuardNew, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
mIvLookBuyGuardNew.setVisibility(View.GONE);
changeLiveRoom(); changeLiveRoom();
} }
}); });