I am trying to create a button where I can hide or show the status bar on my tablet.
I\'ve put in the onCreate
getWindow().addFlags(WindowManager.Lay
Do you have the fullscreen theme set in the manifest?
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
I don't think you'll be able to go fullscreen without this.
I would use the following to add and remove the fullscreen flag:
// Hide status bar
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
// Show status bar
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);