Sub Globals
Private pnlPage1, pnlPage2 As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim pnlWidth, pnlHeight, pnl2Top, pnl2Left As Int
If 100%y > 100%x Then
' Portrait
pnlWidth = 100%x
pnlHeight = 50%y
pnl2Top = pnlHeight
pnl2Left = 0
Else
' landscape
pnlWidth = 50%x
pnlHeight = 100%y
pnl2Top = 0
pnl2Left = pnlWidth
End If
pnlPage1.Initialize( "" )
pnlPage1.LoadLayout( "Panel1" )
Activity.AddView( pnlPage1, 0, 0, pnlWidth, pnlHeight )
pnlPage1.Visible = True
pnlPage2.Initialize( "" )
pnlPage2.LoadLayout( "Panel2" )
Activity.AddView( pnlPage2, pnl2Left, pnl2Top, pnlWidth, pnlHeight )
pnlPage2.Visible = True
End Sub