Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide Status bar on Android Ice Cream Sandwich

I'm working in a launcher for Android ICS but I have a problem with tablets.

I can't hide the status bar. I have try it in Android 2.3.X and it's ok. The problem appears only with Android 4.0.

How can I hide it?

like image 321
NachoMV Avatar asked Mar 15 '12 22:03

NachoMV


1 Answers

You can not get 100% true full screen in Android 4.0.

Use the following to dim the notification bar (aka. status bar, system bar)

 getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);

And use this to hide it

 getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);

And, if I guess right, you are trying to achieve a "kiosk mode". You can get a little help with an app named "surelock". This blocks all the "home" and "back" actions.

It is still not perfect but this may be the best we can achieve with Android ICS.

like image 59
BladeLeaf Avatar answered Sep 24 '22 23:09

BladeLeaf