Android Question Problems with Spinner.SelectedItem

Matteo Granatiero

Active Member
Licensed User
I tried with these two commands but it gives me error
I would like if the "Spinner" contains one of these selected words a msgbox appears

B4X:
Spinner5.SelectedItem.Contains ("Pantaloni" Or "Jeans" Or "Tute" Or "Shorts")

Spinner5.SelectedItem="Pantaloni" Or "Jeans" Or "Tute" Or "Shorts"
 

ronell

Well-Known Member
Licensed User
Longtime User
B4X:
For i = 0 To spinner.Size - 1
        Dim item As String
        item = spinner.GetItem(i)
       
        If item = "Pantaloni" Or item = "Jeans" Or item = "Tute" Or item = "Shorts" Then
            Log("Item found: "&item)
        End If
           
    Next
 
Upvote 0
Top