Forum experts, please advise...
I've been following @corwin42 guides on applying Material design (an excellent read, search the forum for "Material" and you'll see what I mean). I've now got my app displaying in FullScreen mode with my own ToolBar and soon to have modifiable Menu. But the NavigationBar (at the bottom of screen containing Back and Home button) is still on display. I believe to get rid of this I need to enter ImmersiveMode!
I've followed the advice to use JavaObject to set ImmersiveMode (Android 4.4) and this works but leaves a space where the navigation bar was. The advice to fix this is to use the IME Library to detect the screen change and re-size the panel.... Persist webview through orientation change
This is probably fine if just resizing one or two controls. But my activity contains the ToolBar and a Panel, I was planning to load the Panel with a Layout scaled correctly to the device in use and this may contain several Views all of which I guess would need to be rescaled/repositioned. Is this advice still the best way of achieving what I require or is it possible to set ImmersiveMode in a Custom theme? However all my attempts to modify the theme have failed to compile
I'm thinking that I'll just live with the NavigationBar being present but thought I'd ask you experts first in case I'm missing something?
Thanks in advance,
RandomCoder
PS Could someone please also explain why the Sticky Immersive value is 5894 in the B4A example and yet the Android docs states that it should be 4096?
(I tried 4096, it doesn't work!)
I've been following @corwin42 guides on applying Material design (an excellent read, search the forum for "Material" and you'll see what I mean). I've now got my app displaying in FullScreen mode with my own ToolBar and soon to have modifiable Menu. But the NavigationBar (at the bottom of screen containing Back and Home button) is still on display. I believe to get rid of this I need to enter ImmersiveMode!
I've followed the advice to use JavaObject to set ImmersiveMode (Android 4.4) and this works but leaves a space where the navigation bar was. The advice to fix this is to use the IME Library to detect the screen change and re-size the panel.... Persist webview through orientation change
This is probably fine if just resizing one or two controls. But my activity contains the ToolBar and a Panel, I was planning to load the Panel with a Layout scaled correctly to the device in use and this may contain several Views all of which I guess would need to be rescaled/repositioned. Is this advice still the best way of achieving what I require or is it possible to set ImmersiveMode in a Custom theme? However all my attempts to modify the theme have failed to compile
I'm thinking that I'll just live with the NavigationBar being present but thought I'd ask you experts first in case I'm missing something?
Thanks in advance,
RandomCoder
PS Could someone please also explain why the Sticky Immersive value is 5894 in the B4A example and yet the Android docs states that it should be 4096?
(I tried 4096, it doesn't work!)
public static final int SYSTEM_UI_FLAG_IMMERSIVE_STICKY
Added in API level 19
Flag for setSystemUiVisibility(int): View would like to remain interactive when hiding the status bar with SYSTEM_UI_FLAG_FULLSCREEN and/or hiding the navigation bar with SYSTEM_UI_FLAG_HIDE_NAVIGATION. Use this flag to create an immersive experience while also hiding the system bars. If this flag is not set,SYSTEM_UI_FLAG_HIDE_NAVIGATION will be force cleared by the system on any user interaction, and SYSTEM_UI_FLAG_FULLSCREEN will be force-cleared by the system if the user swipes from the top of the screen.
When system bars are hidden in immersive mode, they can be revealed temporarily with system gestures, such as swiping from the top of the screen. These transient system bars will overlay app’s content, may have some degree of transparency, and will automatically hide after a short timeout.
Since this flag is a modifier for SYSTEM_UI_FLAG_FULLSCREEN and SYSTEM_UI_FLAG_HIDE_NAVIGATION, it only has an effect when used in combination with one or both of those flags.
Constant Value: 4096 (0x00001000)
Last edited: