0

I'm developing a app for a specific tablet running android 4.4.4. Users aren't allowed to close the app. I hoped there was a way to completely hide or disable the navigation bar but I can't seem to find a solution. I've already tried to use the method explained on Using Immersive fullscreen but is doesn't seem to have any effect. Any suggestions?

Jason Lie
  • 159
  • 3
  • 12
  • Possible duplicate of [How to hide navigation bar permanently in android activity?](http://stackoverflow.com/questions/21724420/how-to-hide-navigation-bar-permanently-in-android-activity) –  May 03 '16 at 12:50

1 Answers1

0

You can hide the navigation bar using the SYSTEM_UI_FLAG_HIDE_NAVIGATION flag.

Try this code

View decorView = getWindow().getDecorView();
// Hide both the navigation bar and the status bar.
// SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as
// a general rule, you should design your app to hide the status bar whenever you
// hide the navigation bar.
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
              | View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);