Android 弹出Dialog时隐藏状态栏和底部导航栏
作者:互联网
上代码:
dialog.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); dialog.getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() { @Override public void onSystemUiVisibilityChange(int visibility) { int uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_STABLE | //布局位于状态栏下方 View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | //全屏 View.SYSTEM_UI_FLAG_FULLSCREEN | //隐藏导航栏 View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; uiOptions |= 0x00001000; dialog.getWindow().getDecorView().setSystemUiVisibility(uiOptions); } });
标签:HIDE,状态栏,SYSTEM,FLAG,UI,Dialog,getWindow,Android,View 来源: https://www.cnblogs.com/94xiyang/p/11121073.html