Sub Activity_Create(FirstTime As Boolean)
Dim Pan(2) As Panel
Pan(0).Initialize("")
Pan(1).Initialize("")
'Initialize the panels we use for the pages and put them in the container
Container.Initialize
Pan(0).LoadLayout("test")
Container.AddPageAt(Pan(0), "test", 0)
Pan(1).LoadLayout("generationlayout")
Container.AddPageAt(Pan(1), "Generation Info", 1)
'Now we have a container with our panels just add it to the pager object
Pager.Initialize(Container, "Pager")
'As we want to show the tabs page indicator, we initialize it
Tabs.Initialize(Pager)
Tabs.LineHeight = 5dip
Tabs.LineColorCenter = Colors.Green
Tabs.TextColor = Colors.Gray
Tabs.TextColorCenter = Colors.Green
Activity.AddView(Tabs, 0dip, 0dip, 100%x, 100%y)
'We add a line below the tab page indicator because it looks good
Dim Col As ColorDrawable
Col.Initialize(Colors.Green, 0)
Line.Initialize("")
Line.Background = Col
Activity.AddView(Line, 0dip, 35dip, Activity.Width, 2dip)
'Now we can add the pager to the activity
Activity.AddView(Pager, 0dip, 35dip + 2dip, Activity.Width, Activity.Height - 35dip - 2dip)