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); }