Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide StatusBar in Android 4

How to hide StatusBar in Android 4:

StatusBar in Android 4

Help me, please.

like image 651
DaleYY Avatar asked Feb 07 '12 06:02

DaleYY


People also ask

How do I hide the taskbar on Android?

Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.


1 Answers

The bar that is shown in the image in your question is called the system bar.

On devices with no hardware buttons the system bar will always be displayed if user input occurs. You can call setSystemUiVisibility with the flags SYSTEM_UI_FLAG_HIDE_NAVIGATION and request the following window feature FLAG_FULLSCREEN via the Window. This should hide the system bar and make your view fullscreen as long as the user does not interact with the screen. If the user touches the screen the system bar will reappear to allow the user to use the home and back software keys.

If you have a view that the user will interact with but you want him not to be distracted by the system bar you can set the SYSTEM_UI_FLAG_LOW_PROFILE flag. This should dim the system bar and make it less distracting.

like image 157
Janusz Avatar answered Oct 01 '22 10:10

Janusz