Skip to content Skip to sidebar Skip to footer

How To Hide Android Nav Bars Completely

I'm trying to hide android nav bars like that : @TargetApi(Build.VERSION_CODES.JELLY_BEAN) public void hideNavBarsParent(){ mDecorView = getWindow().getDecorView(); mDecorV

Solution 1:

Using View.SYSTEM_UI_FLAG_HIDE_NAVIGATION will hide the navigation bar and put up an invisible window, blocking your app from receiving all touch events. The next touch event will "break the glass" and restore the navigation bar. There is no way to change that behavior prior to 4.4.

Using Immersive Mode in 4.4 allows you to request a slight change to this behavior via some additional flags, allowing interactive apps without a navigation bar. But the navigation bar can always be restored with a swipe from the bottom of the screen, and the system can restore the bar at any time.

Solution 2:

Paste this in your onCreate() method:

requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                            WindowManager.LayoutParams.FLAG_FULLSCREEN);

Post a Comment for "How To Hide Android Nav Bars Completely"