Sub Globals
Private Spinner1 As Spinner
Private Button1 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Spinner1.Initialize("Spinner1")
Button1.Initialize("Button1")
Activity.AddView(Spinner1, 50%x - 100dip, 10%y, 200dip, 25dip)
Activity.AddView(Button1, 50%x - 50dip, 50%y - 50dip, 100dip, 100dip)
For i = 0 To 10
Spinner1.Add("Option " & i)
Next
End Sub
Sub Spinner1_ItemClick (Position As Int, Value As Object)
Log($"Position = ${Position}, Value = ${Value} "$)
End Sub
Sub Button1_Click
Log($"Position = ${Spinner1.SelectedIndex}, Value = ${Spinner1.SelectedItem} "$)
End Sub