Reputation: 1265
I have the following code to hide the status bar taken from http://developer.android.com/training/system-ui/status.html and 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();
}
I get an error on View.SYSTEM_UI_FLAG_FULLSCREEN
;
it seems that SYSTEM_UI_FLAG_FULLSCREEN
doesn't exist anymore in View.
How to fix it? please thanks you
Upvotes: 0
Views: 633
Reputation: 75629
It exists since API16. You must build your app against API16 (or higher)
Upvotes: 1