diff --git a/common/src/main/java/com/yunbao/common/views/HintCustomPopup.java b/common/src/main/java/com/yunbao/common/views/HintCustomPopup.java index 59ec74044..ffa3fc62d 100644 --- a/common/src/main/java/com/yunbao/common/views/HintCustomPopup.java +++ b/common/src/main/java/com/yunbao/common/views/HintCustomPopup.java @@ -11,7 +11,7 @@ import com.yunbao.common.R; import com.yunbao.common.views.weight.ViewClicksAntiShake; public class HintCustomPopup extends CenterPopupView { - private String title, contest,openCancel,openOk; + private String title, contest, openCancel, openOk; private TextView liveOpenCancel, liveOpenOk; public HintCustomPopup(@NonNull Context context, String title, String contest) { @@ -30,7 +30,7 @@ public class HintCustomPopup extends CenterPopupView { } public HintCustomPopup setLiveOpenOk(String openOk) { - this.openOk = openOk; + this.openOk = openOk; return this; } @@ -48,8 +48,13 @@ public class HintCustomPopup extends CenterPopupView { TextView contestText = findViewById(R.id.contest); liveOpenCancel = findViewById(R.id.live_open_cancel); liveOpenOk = findViewById(R.id.live_open_ok); - liveOpenOk.setText(openOk); - liveOpenCancel.setText(openCancel); + if (!TextUtils.isEmpty(openOk)) { + liveOpenOk.setText(openOk); + } + if (!TextUtils.isEmpty(openCancel)) { + liveOpenCancel.setText(openCancel); + } + if (!TextUtils.isEmpty(title)) { titleText.setText(title); }