Is is possible to force an app to always show to navigation bar in an Android app? On Samsung Galaxy S8 it is possible for the user to hide the navbar during "runtime" - which cause some unexpected behaviours in the app (if you are interested; I tried to add a setOnSystemUiVisibilityChangeListener and redraw, invalidate, requestLayout and forceLayout on the view with no luck. Restarting the activity is not applicable as the app is a single-activity-app. I've also looked into WindowInsets with no luck there neither.).
Therefor, I just want to avoid the problem by not allowing the user to remove the navbar. All the resources I can find online is for hiding the navbar. Does anybody how any suggestions on how to make it stay?
The navigation bar is pinned by default. If you want to view files or use apps in full screen, double-tap the Show and hide button to hide the navigation bar. To show the navigation bar again, drag upwards from the bottom of the screen.
Step 1: From Settings, tap Display. Step 2: Scroll down and select Navigation Bar. Step 3: Choose your preferred Navigation Type. You can either allow the Navigation buttons to be permanently displayed on the screen or hide them by selecting Full-Screen Gestures.
I am not much sure about Samsung S8, but I had worked on Samsung S7. I had used lean back mode setSystemUiVisibility()
and passed these two flags
1.SYSTEM_UI_FLAG_FULLSCREEN
2.SYSTEM_UI_FLAG_HIDE_NAVIGATION
Also for enabling immersive mode, I had used SYSTEM_UI_FLAG_IMMERSIVE
in conjunction.
It was referenced from visibility & immersive.
Correct me if I am wrong or I didn't understand the question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With