调整随机PK弹框UI

This commit is contained in:
zlzw 2023-07-21 14:19:20 +08:00
parent dfeb3a78c1
commit 7e3ca79a01

View File

@ -50,6 +50,8 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc); mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc);
mPkBtnDesc.setVisibility(View.VISIBLE); mPkBtnDesc.setVisibility(View.VISIBLE);
mPkBtn.setBackgroundResource(R.drawable.bg_live_room_random_pk_timer); mPkBtn.setBackgroundResource(R.drawable.bg_live_room_random_pk_timer);
mPkBtn.setTag(true);
mRandomPkSwitch.setEnabled(false);
} }
@Override @Override
@ -67,6 +69,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
public void onPkEndStart() { public void onPkEndStart() {
super.onPkEndStart(); super.onPkEndStart();
mPkBtn.setEnabled(false); mPkBtn.setEnabled(false);
mRandomPkSwitch.setEnabled(false);
} }
@Override @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)); mPkBtnTitle.setText(String.format(mContext.getString(R.string.random_pk_info_btn_end), time));
mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc); mPkBtnDesc.setText(R.string.random_pk_info_btn_end_desc);
mPkBtn.setEnabled(false); mPkBtn.setEnabled(false);
mRandomPkSwitch.setEnabled(false);
} }
@Override @Override
@ -276,7 +280,9 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
* 恢复按钮状态 * 恢复按钮状态
*/ */
private void resetPkBtn() { private void resetPkBtn() {
mRandomPkSwitch.setEnabled(true);
mPkBtnDesc.setVisibility(View.GONE); mPkBtnDesc.setVisibility(View.GONE);
mPkBtn.setEnabled(true);
mPkBtnTitle.setText(R.string.random_pk_info_btn_start); mPkBtnTitle.setText(R.string.random_pk_info_btn_start);
mPkBtn.setBackgroundResource(R.drawable.bg_live_random_pk_info_btn); mPkBtn.setBackgroundResource(R.drawable.bg_live_random_pk_info_btn);
} }