Android 11隐藏状态栏和导航栏
程序员文章站
2024-03-01 09:58:04
...
// Hide both the navigation bar and the status bar.
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
// Hide Action bar.
ActionBar actionBar = getSupportActionBar();
// Notice:Replace getSupportActionBar() with getActionBar() if you aren't using androidx...
if (actionBar != null) {
actionBar.hide();
}
上一篇: DataGrid中实现超链接的3种方法
下一篇: Java实现单链表