Android Question Dropdown Spinner

Declan

Well-Known Member
Licensed User
Longtime User
I have a Spinner view that I populate from a database.
B4X:
    '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.
 

Declan

Well-Known Member
Licensed User
Longtime User
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

DonManfred

Expert
Licensed User
Longtime User
Have the first "Id" field visible in the Spinner?
Have you looked at the documentation of the spinner object?

B4X:
Spinner1.AddAll(Array As String("Sunday", "Monday", ...))
Spinner1.SelectedIndex = 0
 
Upvote 0

pjo12345

Active Member
Licensed User
Longtime User
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:
Sub OpenSpinner(s as Spinner)
    Dim r As Reflector
    r.Target = s
    r.RunMethod("performClick")
End Sub
 
Upvote 0
Top