I'm currently using B4XPages and axrlottie, which requires me to use appcompat. While I am using
B4X:
#IncludeTitle: false
to hide the title bar, I am unable to hide the NavigationBar on the MainPage.
Could someone please guide me on how to dynamically show and hide the NavigationBar during runtime? Any help or code examples would be greatly appreciated.
Private Sub SetActionBarState(Visible As Boolean)
Dim jo As JavaObject
jo.InitializeContext
jo.RunMethodJO("getSupportActionBar", Null).RunMethod(IIf(Visible, "show", "hide"), Null) 'change to "getActionBar" for non-AppCompat
End Sub
Private Sub SetActionBarState(Visible As Boolean)
Dim jo As JavaObject
jo.InitializeContext
jo.RunMethodJO("getSupportActionBar", Null).RunMethod(IIf(Visible, "show", "hide"), Null) 'change to "getActionBar" for non-AppCompat
End Sub
The code you provided works correctly, but there's an issue. When I close the bar, a section remains empty below, equal to the height of the bar. It does not fit 100%. The root screen does not cover the entire display. I have attached a screenshot. How can I prevent this?