【发布时间】:2020-11-13 22:18:12
【问题描述】:
我有一个全屏活动并通过以下代码将其设置为全屏
private void setFullScreenFocus() {
getWindow().getDecorView()
.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
我已经实现了一个弹出窗口对话框,但是当它显示时,它使状态栏和导航栏可见。如何避免?
下面是弹窗代码
PopupWindow seasonEpisodePopUpWindow;
LayoutInflater inflater = (LayoutInflater) anchorView.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
if (seasonEpisodeView == null)
seasonEpisodeView = inflater.inflate(R.layout.player_seasons_episode_list, null);
if (!seasonEpisodePopUpWindow.isShowing()) {
seasonEpisodePopUpWindow.showAtLocation(anchorView, Gravity.BOTTOM, viewLocation[0], height);
appCMSPlayVideoFragment.setPreviousNextVisibility(false);
}
【问题讨论】:
-
您可以查看此链接以获取您的代码stackoverflow.com/questions/36554599/…
-
您是否在创建对话框时发送此活动对象?像
new AlertDialog(this)什么的? -
@RahulKumar popupwindown 不是警报对话框
标签: android android-activity android-popupwindow