Sub SetCustomColors
Dim i As Int
Dim current As Int = TabHost1.CurrentTab
For i = 0 To TabHost1.TabCount - 1
TabHost1.CurrentTab = i
Next
TabHost1.CurrentTab = current
For Each v As View In Activity.GetAllViewsRecursive
SetViewColors(v)
Next
End Sub
Sub SetViewColors(v As View)
Select Case True
Case v Is CheckBox
Dim chk As CheckBox
chk = v
chk.Color=GetBG
chk.TextColor=GetFG
Case v Is EditText
Dim txt As EditText
txt = v
txt.Color=GetBG
txt.TextColor=GetFG
Case v Is RadioButton
Dim rad As RadioButton
rad = v
rad.Color=GetBG
rad.TextColor=GetFG
Case v Is Button
Dim but As Button
but = v
but.Color=GetBG
but.TextColor=GetFG
Case v Is Spinner
Dim spi As Spinner
spi = v
spi.Color=GetBG
spi.TextColor=GetFG
Case v Is Panel
Dim pnl As Panel
pnl = v
pnl.Color=GetBG
Case v Is Label
Dim lab As Label
lab = v
Log("Text=" & lab.Text)
If lab.Tag="CAPTION" Then
lab.Color=GetBG
lab.TextColor=GetFG
Else
lab.Color=GetBG
lab.TextColor=GetFG
End If
End Select
End Sub