Sub AddOverlay
Dim mView As Panel
mView.Initialize("")
mView.Color=Colors.Red
Dim mlp As JavaObject
Dim vtype As Int = -1, pixelFormat As Int = -3
mlp.InitializeNewInstance("android.view.WindowManager$LayoutParams", Array(vtype, 200, 2010,596, pixelFormat))
mlp.SetField("gravity", Bit.Or(Gravity.TOP, Gravity.CENTER))
Dim windowManager As JavaObject = GetContext.RunMethod("getSystemService", Array("window"))
windowManager.RunMethod("addView", Array(mView, mlp))
End Sub
Sub GetContext As JavaObject
Return GetBA.GetField("context")
End Sub
Sub GetBA 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