Hide on-screen navigation bar in full-screen mode
Can AndBible hide on-screen navigation buttons (i.e., enable immersive mode) in addition to the status bar up top in full-screen mode? This is often done for games in full-screen mode or eBook readers like the Kindle app, and I'd love for the same to happen to get an extra line or two of text (and fewer distractions) in full-screen mode in AndBible. A swipe up from the bottom should/could bring up the navigation bar.
Thanks!
-
I have added an issue for this: https://github.com/mjdenham/and-bible/issues/135
-
Eric commented
Martin, it looks like the code change for this would be pretty simple: in the call to setSystemUiVisibility() in setLightsOutMode(), replace SYSTEM_UI_FLAG_LOW_PROFILE with SYSTEM_UI_FLAG_IMMERSIVE in conjunction with SYSTEM_UI_FLAG_FULLSCREEN and SYSTEM_UI_FLAG_HIDE_NAVIGATION, i.e.,
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_IMMERSIVE | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
The only catch I can see is that this flag was introduced in Android 4.4 API, so if you are holding back and wanting to maintain compatibility with pre-KitKat APIs (which seems a little overly conservative), then you couldn't switch to using immersive mode.
What do you think?
-
Sorry, you are right. It uses the older Lights-out-mode rather than the newer Immersive mode. Thanks for pointing this out. I may look at this again in the future.
-
Eric commented
Hi Martin,
Thanks for the quick response! I must be missing something -- when I double-tap, it hides the status bar (at the top) but not the navigation bar (at the bottom). I'm running AndBible 2.9.4.237 on Nougat 7.1.1 on an Xperia X Compact with no capacitive buttons, just the navigation bar. Are you saying that the expected behavior on double-tap is to hide both the status bar and navigation bar?
Eric
-
Hi Eric,
This is already possible by double-tapping in the middle of the screen.
Martin