Sub Globals
Dim BarraDeEstadomView As Label
' ----------------
' ----------------
' ----------------
Sub Activity_Create(FirstTime As Boolean)
BarraDeEstadomView.Initialize("")
BarraDeEstadomView.Text =""
QuitarBarraEstatus ' hide
' ----------------
' ----------------
' ----------------
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed then PonerBarraEstatus ' Active
' ----------------
' ----------------
' ----------------
Sub QuitarBarraEstatus
' Hide
Dim mlp As JavaObject
Dim vtype As Int = -1, pixelFormat As Int = -3
Try
mlp.InitializeNewInstance("android.view.WindowManager$LayoutParams", Array(vtype, 100, 2010,296, pixelFormat))
Catch
End Try
Try
mlp.SetField("gravity", Bit.Or(Gravity.TOP, Gravity.CENTER))
Catch
End Try
Try
Dim windowManager As JavaObject = BarraEstatusGetContext.RunMethod("getSystemService", Array("window"))
Catch
End Try
Try
windowManager.RunMethod("addView", Array(BarraDeEstadomView, mlp))
Catch
End Try
End Sub
Sub PonerBarraEstatus
' Active
If BarraDeEstadomView.IsInitialized = False Then
BarraDeEstadomView.Initialize("")
BarraDeEstadomView.Text =""
End If
Try
Dim windowManager As JavaObject = BarraEstatusGetContext.RunMethod("getSystemService", Array("window"))
windowManager.RunMethod("removeView", Array(BarraDeEstadomView))
Catch
End Try
End Sub
Sub BarraEstatusGetContext As JavaObject
Return BarraEstatusGetBA.GetField("context")
End Sub
Sub BarraEstatusGetBA As JavaObject
Dim jo As JavaObject
Dim cls As String = Me
cls = cls.SubString("class ".Length)
jo.InitializeStatic(cls)
Return jo.GetFieldJO("processBA")
End Sub