Android Question Dropdown Spinner

Declan

Well-Known Member
Licensed User
Longtime User
I have a Spinner view that I populate from a database.
B4X:
Expand Collapse Copy
    'Fill the tools id spinner (aka combo box).
    DBUtils.ExecuteSpinner(SQL, "SELECT Id FROM Tools", Null, 0, spnrViewTools)
This works cool.
However, is it possible for the Spinner view to "Dropdown" via code once populated?
I don't want the user to have to "click" on the Spinner to view the populated data.
 
OK
I have the Spinner in a Panel and when it loads it just shows the "Blank" Spinner.
Is it possible to either:
Have some text shown in the Spinner to prompt he user to click?
OR
Have the first "Id" field visible in the Spinner?
 
Upvote 0
Have the first "Id" field visible in the Spinner?
Have you looked at the documentation of the spinner object?

B4X:
Expand Collapse Copy
Spinner1.AddAll(Array As String("Sunday", "Monday", ...))
Spinner1.SelectedIndex = 0
 
Upvote 0
However, is it possible for the Spinner view to "Dropdown" via code once populated?
I don't want the user to have to "click" on the Spinner to view the populated data.

I use this:

B4X:
Expand Collapse Copy
Sub OpenSpinner(s as Spinner)
    Dim r As Reflector
    r.Target = s
    r.RunMethod("performClick")
End Sub
 
Upvote 0
Back
Top