0
我有下面的代码隐藏http://developer.android.com/training/system-ui/status.html采取的状态栏和Hide status bar androidAndroid的隐藏状态栏,兼容性
//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中不再存在。
如何解决?请谢谢
好吧,我不知道这个谢谢 – LeSam