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