From 7e3ca79a01b24e03f77054171a4e56d5896411fc Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 21 Jul 2023 14:19:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=9A=8F=E6=9C=BAPK=E5=BC=B9?= =?UTF-8?q?=E6=A1=86UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/live/dialog/RandomPkDialogFragment.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java index 2059c2917..5f4bbb70d 100644 --- a/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/RandomPkDialogFragment.java @@ -50,6 +50,8 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc); mPkBtnDesc.setVisibility(View.VISIBLE); mPkBtn.setBackgroundResource(R.drawable.bg_live_room_random_pk_timer); + mPkBtn.setTag(true); + mRandomPkSwitch.setEnabled(false); } @Override @@ -67,6 +69,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On public void onPkEndStart() { super.onPkEndStart(); mPkBtn.setEnabled(false); + mRandomPkSwitch.setEnabled(false); } @Override @@ -75,6 +78,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On mPkBtnTitle.setText(String.format(mContext.getString(R.string.random_pk_info_btn_end), time)); mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc); mPkBtn.setEnabled(false); + mRandomPkSwitch.setEnabled(false); } @Override @@ -194,7 +198,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On @Override public void onError(String error) { - ToastUtil.show( R.string.net_error); + ToastUtil.show(R.string.net_error); } }); } @@ -276,7 +280,9 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On * 恢复按钮状态 */ private void resetPkBtn() { + mRandomPkSwitch.setEnabled(true); mPkBtnDesc.setVisibility(View.GONE); + mPkBtn.setEnabled(true); mPkBtnTitle.setText(R.string.random_pk_info_btn_start); mPkBtn.setBackgroundResource(R.drawable.bg_live_random_pk_info_btn); }