Sub Activity_Create(FirstTime As Boolean)
Dim l As Label
l.Initialize("l")
Activity.AddView(l, 0, 0, 100dip, 100dip)
l.Text = "Some text"
SetColorList(l, Colors.Yellow, Colors.Blue)
End Sub
Sub l_Click
End Sub
Sub SetColorList (Label1 As Label, DefaultColor As Int, PressedColor As Int)
Dim sd As StateListDrawable
Dim clrs(2) As Int
Dim states(2,1) As Int
clrs(0) = DefaultColor
clrs(1) = PressedColor
states(0, 0) = sd.State_Pressed
Dim r As Reflector
Dim csl As Object
csl = r.CreateObject2("android.content.res.ColorStateList", Array As Object(states, clrs), _
Array As String("[[I", "[I"))
r.Target = Label1
r.RunMethod4("setTextColor", Array As Object(csl), Array As String("android.content.res.ColorStateList"))
End Sub