I was wondering how I could hide the navigation bar in an Android application?
I know how to hide it initially, but as soon as I touch the screen it pops back up. I want to hide it the same way games like Clash of Clans hide it where the only way to make it pop up is by swiping down the notifications or by swiping where the navigation bar should be.
You Can Create An Activity With The Snippet Above,And Then Add Another Windows Above The Layout:
Good Luck With It
the easy way is adding this 2 lines after super.onCreate(savedInstanceState);
use immersive mode check this Immersive mode
Here it is in the context of the onCreate method:
The Android docs have a good explanation of what the different flags do: Using Immersive Full-Screen Mode
In your activity's onCreate method: