Sub Globals
Dim Panel1 As Panel
Dim Panel2 As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Activity.LoadLayout(...)
'Here I do not load the panels from a layout file so we need to initialize them.
Panel1.Initialize("Panel1")
Panel1.Color = Colors.Red
Panel2.Initialize("Panel2")
Panel2.Color = Colors.Blue
Activity.AddView(Panel1, 0, 0, 100%x, 100%y)
Activity.AddView(Panel2, 0, 0, 100%x, 100%y)
If FirstTime Then
Panel1.BringToFront
Else
Panel1.Visible = False
End If
End Sub
Sub Panel1_Click
Panel1.Visible = False
Panel2.BringToFront
End Sub