From 2a6af7c165cf2bdbf75b3bc6349e03909a6d7d41 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 17 May 2023 13:36:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E6=99=B0=E5=BA=A6=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=BC=B9=E7=AA=97=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/common/views/HintCustomPopup.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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); }