Hi All,
I've been looking at the different samples of spinner and they all look good. I just have one question, how can I load layout with a spinner on top, meaning I do not need to click on the field to launch the spinner? Thanks in advance ... Martin
Thanks Beja but I got an error on compile saying: java.lang.RuntimeException: java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead.
Did you create the spinner in the designer? If so this should work. If you created it with code do a search for openspinner.
B4X:
Sub Activity_Create(FirstTime As Boolean)
'opens the spinner named sp
OpenSpinner(sp)
End Sub
'no need to change this sub
Sub OpenSpinner(s As Spinner)
Dim r As Reflector
r.Target = s
r.RunMethod("performClick")
End Sub