Sub btnStart_Click
Log($"btnStart_Click()"$)
Dim seq() As Int = Array As Int(0,3,2,1,1,2,3) ' Sequence of Buttons to show
Dim time As Int = 500 ' MS to show a Color
For Each key As Int In seq
Dim r As Int = key
Log($"Button # ${r}"$)
Dim btn As Button = btns(r)
Log($"ButtonText = ${btn.Text}"$)
Dim enabled As ColorDrawable
Select r
Case 0
'Log("Red")
enabled.Initialize(Colors.Red, 10dip)
Case 1
'Log("Green")
enabled.Initialize(Colors.Green, 10dip)
Case 2
'Log("Blue")
enabled.Initialize(Colors.Blue, 10dip)
Case 3
'Log("Yellow")
enabled.Initialize(Colors.Yellow, 10dip)
End Select
Dim unchecked As ColorDrawable
unchecked.Initialize(Colors.White, 10dip)
Dim sld As StateListDrawable
sld.Initialize
sld.AddState(sld.State_Enabled, enabled)
sld.AddState(sld.State_Disabled, unchecked)
btn.Background = sld
btn.Enabled = False
Sleep(time)
btn.Enabled = True
Sleep(time)
Next