禁止PK过程中主播点离开按钮
This commit is contained in:
parent
8f0a1a09a6
commit
56475e729c
@ -532,6 +532,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
}
|
||||
bundle.putBoolean(Constants.HAS_GAME, hasGame);
|
||||
bundle.putInt("leave", leave);
|
||||
bundle.putBoolean("isPk", isDRPK == 1 || PKing);
|
||||
bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen());
|
||||
fragment.setArguments(bundle);
|
||||
fragment.setFunctionClickListener(this);
|
||||
@ -851,7 +852,9 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
}
|
||||
super.release();
|
||||
}
|
||||
|
||||
private boolean isKeyBack = false;
|
||||
|
||||
@Override
|
||||
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
|
@ -13,6 +13,7 @@ import android.widget.TextView;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
import com.yunbao.live.interfaces.LiveFunctionClickListener;
|
||||
@ -26,6 +27,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
||||
private View mWishView, mPrankView, mWksView, mBeautyView, mCameraView, mLeaveView, mOnePkView, mMultiPkView, mMicView;
|
||||
private LiveFunctionClickListener mFunctionClickListener;
|
||||
private int leave = 0;
|
||||
private boolean isPk;
|
||||
|
||||
|
||||
// boolean isRy = false;
|
||||
@ -65,6 +67,7 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
||||
hasGame = bundle.getBoolean(Constants.HAS_GAME, false);
|
||||
openFlash = bundle.getBoolean(Constants.OPEN_FLASH, false);
|
||||
leave = bundle.getInt("leave", 0);
|
||||
isPk = bundle.getBoolean("isPk", false);
|
||||
// isRy = bundle.getBoolean("isRy", false);
|
||||
}
|
||||
mWishView = findViewById(R.id.live_tool_wish);
|
||||
@ -126,6 +129,10 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
||||
} else if (id == R.id.live_tool_camera) {
|
||||
mFunctionClickListener.onClick(LIVE_FUNC_CAMERA);
|
||||
} else if (id == R.id.live_tool_leave) {
|
||||
if (isPk) {
|
||||
ToastUtil.show("PK中禁止离开");
|
||||
return;
|
||||
}
|
||||
mFunctionClickListener.onClick(LIVE_FUNC_ZSLK);
|
||||
} else if (id == R.id.live_tool_one_pk) {
|
||||
mFunctionClickListener.onClick(LIVE_FUNC_LINK_MIC);
|
||||
|
Loading…
Reference in New Issue
Block a user