How to completely exit from Immersive full screen mode?
Calling setSystemUiVisibility() with View.SYSTEM_UI_FLAG_VISIBLE clears all flags:
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
What worked for me is the following:
View decorView = activity.getWindow().getDecorView();
decorView.setSystemUiVisibility(0);
I might be wrong but it seems like calling setSystemUiVisibility
with 0
clears the flags which were previously applied.