【发布时间】:2014-02-09 15:38:56
【问题描述】:
我有以下代码来隐藏从http://developer.android.com/training/system-ui/status.html 和Hide status bar android 获取的状态栏
//hide statut bar
if (Build.VERSION.SDK_INT < 16) { //ye olde method
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
} else { // Jellybean and up, new hotness
View decorView = getWindow().getDecorView();
// Hide the status bar.
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
// Remember that you should never show the action bar if the
// status bar is hidden, so hide that too if necessary.
ActionBar actionBar = getActionBar();
actionBar.hide();
}
View.SYSTEM_UI_FLAG_FULLSCREEN 出现错误;
SYSTEM_UI_FLAG_FULLSCREEN 似乎在 View 中不再存在。
如何解决?谢谢你
【问题讨论】:
标签: java android statusbar android-4.2-jelly-bean