我有以下代码来隐藏从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中不再存在。
如何解决?谢谢你
答案 0 :(得分:1)
自API16起存在。您必须针对API16(或更高版本)
构建您的应用