修改守护列表页标签展示

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,6 +200,12 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
@Override @Override
public void onSuccess(GuardGetGuardUserInfoModel data) { public void onSuccess(GuardGetGuardUserInfoModel data) {
getGuardUserInfoModel = data; getGuardUserInfoModel = data;
if (TextUtils.equals(data.getIsOpen(), "0")) {
guardianTask.setVisibility(GONE);
myGraudGrade.setVisibility(GONE);
btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard");
guard_hint.setText(WordUtil.getNewString(R.string.guardian_for_your_favorite_anchor));
} else {
if (data.getGuardType() == 0) { if (data.getGuardType() == 0) {
guardianTask.setVisibility(GONE); guardianTask.setVisibility(GONE);
myGraudGrade.setVisibility(GONE); myGraudGrade.setVisibility(GONE);
@ -232,6 +239,8 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
break; 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();
} }
}); });