Android Question Bottom android bar

hub73

Active Member
Licensed User
Longtime User
Hi !

When i use my application (with Kitkat), if i manually hide the android bottom bar (i don't know exactly its name) all the portion where was the bar become a black rectangle ! So is there a method to refresh my appli to avoid this ? (i've some navigation buttons here).

Could you really hide the bar to avoid this ? (Not sure to find the correct code as i don't know this bar english name)

Many thanks !
 

hub73

Active Member
Licensed User
Longtime User
i use this from Informatix (https://www.b4x.com/android/forum/threads/full-screen-immersive-mode-android-4-4.35634/#post-209100)

B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim jo AsJavaObject = Activity
Dim e As Object = jo.CreateEvent("android.view.View.OnSystemUiVisibilityChangeListener", "VisibilityChanged", Null)
jo.RunMethod("setOnSystemUiVisibilityChangeListener", ArrayAs Object(e))
Activity.Width = -1
Activity.Height = -1
End Sub

Sub Activity_Resume
Activity.Color = Colors.Red
End Sub

Sub  ForceImmersiveMode
Dim r AsReflector
r.Target = r.GetActivity
r.Target = r.RunMethod("getWindow")
r.Target = r.RunMethod("getDecorView")
r.RunMethod2("setSystemUiVisibility", 5894, "java.lang.int")End SubSub VisibilityChanged_Event(MethodName AsString, Args() As Object) As Object
ForceImmersiveMode
End Sub

Sub Activity_WindowFocusChanged(HasFocus As Boolean)
If HasFocus Then
ForceImmersiveMode
EndIf
End Sub

Is it possible to adapt the code to keep the top activity title bar ? (i've a menu)
Thanks !
 
Upvote 0
Top