Hide Status bar on Android Ice Cream Sandwich

后端 未结 6 1026
醉梦人生
醉梦人生 2020-12-23 18:14

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

6条回答
  •  悲哀的现实
    2020-12-23 18:44

    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.

提交回复
热议问题