I'm working on a full Landscape project. I need all the time to hide manually Navigation Bar. Opening new fragment all work perfectly calling following util on onResume method:
fun systemUiVisibility(activity: Activity) {
activity.window.decorView.systemUiVisibility = (
View.SYSTEM_UI_FLAG_IMMERSIVE
or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_FULLSCREEN
or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
)
activity.window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
}
When I open several items, such as Bottom sheet Fragment and others, the navigation bar is displayed again. Is there any way to permanently hide it anywhere?