1,可以通过滑动屏幕来显示status bar:
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
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
| View.INVISIBLE);
2,设置后不能显示status bar.只能重新启动,不过需要在BSP中重新build
getWindow().getDecorView().setSystemUiVisibility( View.STATUS_BAR_DISABLE_EXPAND
| View.STATUS_BAR_DISABLE_NOTIFICATION_ICONS
| View.STATUS_BAR_DISABLE_NOTIFICATION_ALERTS
| View.STATUS_BAR_DISABLE_SYSTEM_INFO | View.STATUS_BAR_DISABLE_HOME
| View.STATUS_BAR_DISABLE_RECENT | View.STATUS_BAR_DISABLE_BACK);