Hi , is there a way to add a listener for immersive mode " View.OnSystemUiVisibilityChangeListener" ?
I tryed with this code but it doesn't works , the "VisibilityChanged_Event" is not fired when the user touch the edge and the bar reappear :
I tryed with this code but it doesn't works , the "VisibilityChanged_Event" is not fired when the user touch the edge and the bar reappear :
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity_WindowFocusChanged(True)
Dim lv As LayoutValues = GetRealSize
Dim jo As JavaObject = Activity
Dim e As Object = jo.CreateEvent("android.view.View.OnSystemUiVisibilityChangeListener", "VisibilityChanged", Null)
jo.RunMethod("setOnSystemUiVisibilityChangeListener", Array As Object(e))
jo.RunMethod("setBottom", Array(lv.Height))
jo.RunMethod("setRight", Array(lv.Width))
Activity.Height = lv.Height
Activity.Width = lv.Width
Activity.LoadLayout("main")
End Sub
Sub VisibilityChanged_Event(MethodName As String, Args() As Object) As Object
ForceImmersiveMode
End Sub