Question

Since it seems that we can no longer hide the bar with home and back buttons in Jellybean, I'd at least like to fade it out a little like in the Kindle app (where the buttons are only small discrete dots). I've been searching all over the place for this but I can't seem to find it!

Cheers /M

Was it helpful?

Solution

You can use:

View rootView = getWindow().getDecorView();
rootView.setSystemUiVisibility(View.STATUS_BAR_HIDDEN); 

View.SYSTEM_UI_FLAG_LOW_PROFILE replaces View.STATUS_BAR_HIDDEN on Android 4.0 and above.

You can also use View.SYSTEM_UI_FLAG_HIDE_NAVIGATION to attempt to hide the bar completely. Note that this will mostly only work on handsets and not tablets, and that several Samsung TouchWiz devices do not interpret this correctly. The bar will also consume the first user interaction with the screen to show itself again while your app is running.

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top