Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main2_menu")
B4xEasyTabber1.GetTabPanel(0).LoadLayout("tabcontent")
B4xEasyTabber1.GetTabPanel(1).LoadLayout("tabcontent")
B4xEasyTabber1.GetTabTitleLabel(0).Text="Tab 1"
End Sub
Sub Activity_Resume
'restore the tab if returning to the activity or changing orientation
If LastTab<>B4xEasyTabber1.CurrentTab Then B4xEasyTabber1.CurrentTab=LastTab
End Sub
Sub B4xEasyTabber1_TabChanged (ActiveTabNumber As Int)
LastTab=ActiveTabNumber
End Sub