Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio: Hide Navigation bar?

Is there a way to hide the Navigation bar (back, home settings etc..) in Design View? --- essentially showing my app full screen (except for the pull down action bar)

like image 896
Mike6679 Avatar asked Oct 23 '14 21:10

Mike6679


People also ask

How do I hide navigation bar on Android?

Way 1: Touch “Settings” -> “Display” -> “Navigation bar” -> “Buttons” -> “Button layout”. Choose the pattern in “Hide navigation bar” -> When the app opens, the navigation bar will be automatically hidden and you can swipe up from the bottom corner of the screen to show it.

Can I hide my navigation bar?

Using the Show and hide button at the left side of the navigation bar, you can set the navigation bar to be hidden or pinned on the screen when you use apps or features. The navigation bar is pinned by default.

How do I hide the navigation bar in Android 9?

Simply just go to Settings -> Display ->Navigation Bar. Go to Navigation type and select Navigation buttons to show the navigation bar. If you dont want to use the buttons, you can simply hide it and just use the swipe up features with Full screen gesture type.


1 Answers

is to late but this answer maybe can help someone add this to your activity

    @Override
public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);
    if (hasFocus) {
        getWindow().getDecorView().setSystemUiVisibility(
                View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                        | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                        | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_FULLSCREEN
                        | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
    }
}
like image 64
AflamZone Avatar answered Oct 10 '22 00:10

AflamZone