Sub Globals
Dim Panel1, Panel2, Panel3 As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
Panel1.Initialize("") : Panel1.Visible = False
Panel2.Initialize("") : Panel2.Visible = False
Panel3.Initialize("") : Panel3.Visible = False
Panel1.LoadLayout("1") 'Regular layouts created with the designer
Panel2.LoadLayout("2")
Panel3.LoadLayout("3")
Activity.AddView(Panel1, 0, 0, 100%x, 100%y)
Activity.AddView(Panel2, 0, 0, 100%x, 100%y)
Activity.AddView(Panel3, 0, 0, 100%x, 100%y)
Panel1.Visible = True
'later switch to second layout
Panel1.Visible = False
Panel2.Visible = True
End Sub