I use this code to hide navigation bar:
this.window.decorView.systemUiVisibility = (
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY)
But navigation bar shows up after minimizing app and going back to it? Is it possible to avoid that?
Put the above code in onResume() and try