Search code examples
androidstatusbarandroid-launcher

Removing status bar


I have an Android 5.1 tablet with root. I'm implementing an app in kiosk mode. For that I'm using the immersive mode, which nicely hides the navigation and status bar. But with a swipe these bars reappears, which is not what I want.

With adding qemu.hw.mainkeys=0 to the end of the build.prop file I was able to get rid of the navigation (bottom) bar. Unfortunately, the status bar still re-appears when i pull down from the upper side of the screen.

Is there a possibility to get rid of the status bar by editing the builds.prop file or in another way?


Solution

  • Not so familiar with root device, so i think about different way, have you try to hide it in main activity?

    View decorView = getWindow().getDecorView();
    // Hide the status bar.
    int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
    decorView.setSystemUiVisibility(uiOptions);
    // Remember that you should never show the action bar if the
    // status bar is hidden, so hide that too if necessary.
    ActionBar actionBar = getActionBar();
    actionBar.hide();
    

    This applied for 4.1 and Higher, see more in Android Developer