修改守护列表页标签展示
This commit is contained in:
parent
123b9dd74a
commit
4a4a52aa61
@ -38,6 +38,17 @@ public class GuardGetGuardUserInfoModel extends BaseModel {
|
||||
private String userLanguage;
|
||||
@SerializedName("live_language")
|
||||
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() {
|
||||
return uid;
|
||||
|
@ -58,8 +58,7 @@
|
||||
android:id="@+id/rewards_img1"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tequan_1" />
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rewards_text1"
|
||||
@ -86,8 +85,7 @@
|
||||
android:id="@+id/rewards_img2"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tequan_1" />
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rewards_text2"
|
||||
@ -112,8 +110,7 @@
|
||||
android:id="@+id/rewards_img3"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/tequan_1" />
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rewards_text3"
|
||||
|
@ -2,6 +2,7 @@ package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
@ -199,39 +200,47 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
|
||||
@Override
|
||||
public void onSuccess(GuardGetGuardUserInfoModel data) {
|
||||
getGuardUserInfoModel = data;
|
||||
if (data.getGuardType() == 0) {
|
||||
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 {
|
||||
guardianTask.setVisibility(VISIBLE);
|
||||
myGraudGrade.setVisibility(VISIBLE);
|
||||
btnGuardOpen.setText(WordUtil.isNewZh() ? "續費守護" : "Renewal Guard");
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "您是當前主播的" : "You are the current anchor's ")
|
||||
.append("【");
|
||||
switch (data.getGuardType()) {
|
||||
case 1:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "星之守護" : "Star Guardian")
|
||||
.append("】");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
case 2:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "王之守護" : "King Guardian")
|
||||
.append("】");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
case 3:
|
||||
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.getGuardType() == 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 {
|
||||
guardianTask.setVisibility(VISIBLE);
|
||||
myGraudGrade.setVisibility(VISIBLE);
|
||||
btnGuardOpen.setText(WordUtil.isNewZh() ? "續費守護" : "Renewal Guard");
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "您是當前主播的" : "You are the current anchor's ")
|
||||
.append("【");
|
||||
switch (data.getGuardType()) {
|
||||
case 1:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "星之守護" : "Star Guardian")
|
||||
.append("】");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
case 2:
|
||||
stringBuffer.append(WordUtil.isNewZh() ? "王之守護" : "King Guardian")
|
||||
.append("】");
|
||||
guard_hint.setText(stringBuffer.toString());
|
||||
break;
|
||||
case 3:
|
||||
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) {
|
||||
guard_time.setVisibility(GONE);
|
||||
} else {
|
||||
|
@ -1105,6 +1105,7 @@ public class LiveGiftAnimPresenter {
|
||||
ViewClicksAntiShake.clicksAntiShake(mIvLookBuyGuardNew, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
mIvLookBuyGuardNew.setVisibility(View.GONE);
|
||||
changeLiveRoom();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user