I also ran into this problem. There seems to be no way to prevent Android from displaying the navigation bar again after configuration changes.
To make matters worse, it is also not guaranteed when exactly the system interface will be restored. According to my tests, on some devices, the navigation bar may appear even after onWindowFocusChanged and onResume .
The only reliable way I found to prevent unwanted isInFullScreenMode from appearing is to add the isInFullScreenMode flag and implement View.OnSystemUiVisibilityChangeListener something like this:
@Override public void onSystemBarsVisible() { if (isInFullScreenMode) {
Of course, sometimes in a turn we see how system panels quickly appear and disappear. But at least we can be sure that the state of the user interface of our application will be reliably restored.
Edit: in order to avoid possible confusion (as can be seen from the comments), I will explain a couple of things:
onSystemBarsVisible and onSystemBarsHidden are user methods that were defined in my application. You will not find them on Android platforms;- The
override keywords are used here because these methods were part of the contract (interface); - The application in which I used this functionality is deprecated. However, I still remember that the main idea was as follows (fragment in Kotlin):
fun onSystemUiVisibilityChange(visibility: Int) { if (visibility and View.SYSTEM_UI_FLAG_FULLSCREEN == 0) {
source share