Sub Activity_Create(FirstTime As Boolean)
Dim TabHostExtras1 As TabHostExtras
Dim x As Int
cdBackgroundNotSelected.Initialize(Colors.DarkGray, 50)
cdBackgroundSelected.Initialize(Colors.Blue, 50)
Activity.LoadLayout("Main")
If Not(tbhPages.IsInitialized) Then
tbhPages.Initialize("tbhPages")
End If
tbhPages.AddTab("Volunteer","home") ' index 0
tbhPages.AddTab("Customers","customers") ' index 1
tbhPages.AddTab("Donors","donors") ' Index 2
TabHostExtras1.setTabHeight(tbhPages, 50)
For x = 0 To TabHostExtras1.GetTagWidget(tbhPages).TabCount-1
setStateList(TabHostExtras1.GetTagWidget(tbhPages).GetChildTabViewAt(x), cdBackgroundSelected, cdBackgroundNotSelected)
Next
tabManager.setTabTextColorStateList(tbhPages, "tbhpages_text_colors")
Sub setStateList(p As Panel, selected As ColorDrawable, notSelected As ColorDrawable)
Dim StateListDrawable1 As StateListDrawable
StateListDrawable1.Initialize
StateListDrawable1.AddState(StateListDrawable1.State_Selected, selected)
StateListDrawable1.AddCatchAllState(notSelected)
p.Background=StateListDrawable1
End Sub