B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim p As Panel
Dim b As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
b.Initialize("")
p.Initialize("")
CheckType(p,"p")
CheckType(b,"b")
End Sub
Sub CheckType(o As Object,s As String)
If o Is Panel Then Log(s & " is panel")
If o Is Button Then Log(s & " is button")
If o Is Activity Then Log(s & " is activity")
End Sub
p is panel
p is activity
b is button
The question is why is the Panel being reported as an Activity?
Thank you.