2

I'm trying to hide navigation bar (back, home buttons) on an Android 4.0.3 tablet.

I've tested this code on android 4.3 emulator and it's working:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    View v = getWindow().getDecorView();
    v.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
}

But it's doing nothing on my tablet !

I'm not sure if SYSTEM_UI_FLAG_HIDE_NAVIGATION should work on 4.0.3 but I see that tablet's default video player on 4.0.3 is hiding the navigation bar and the behavior looks like it is using SYSTEM_UI_FLAG_HIDE_NAVIGATION.

Is this code supposed to work on 4.0.3?

If not is there some alternative that I could use?

Pacerier
  • 86,231
  • 106
  • 366
  • 634
Kala7a
  • 21
  • 1
  • 2
  • 2
    I've found [this article](http://stackoverflow.com/questions/12804642/android-tablet-navigation-bar-wont-hide) that answers my question. Moreover after taking a closer look I've found that tablet's default movie player is using SYSTEM_UI_FLAG_LOW_PROFILE instead of SYSTEM_UI_FLAG_HIDE_NAVIGATION. Probably as pointed out SYSTEM_UI_FLAG_HIDE_NAVIGATION is not working on android 4.0.3. – Kala7a Aug 20 '13 at 16:02
  • You may want to post that as an answer..... – Pacerier Nov 18 '14 at 07:38

0 Answers0