I just noticed AutoCompleteEditText, it does everything I was trying to do with EditText. I only want to check for prefixes. Unless SearchView works better with maps then SearchView is it.
I’ve only found examples of AutoCompleteEditText used with arrays:
How does AutoCompleteEditText use a Map?
And do an:
Thanks in advance
I’ve only found examples of AutoCompleteEditText used with arrays:
B4X:
Sub Activity_Create(FirstTime As Boolean)
ACT.Initialize("ACT")
Activity.AddView(ACT, 10dip, 10dip, 500dip, 80dip)
Dim people() As String
people = Array As String("Alan", "Albert", "Amanda", "Andorra")
ACT.SetItems(people)
End Sub
B4X:
Sub Activity_Create(FirstTime As Boolean)
ACT.Initialize("ACT")
Activity.AddView(ACT, 10dip, 10dip, 500dip, 80dip)
Dim mapPerson As Map = CreateMap("name": "Alan", "age": 1, "photo":"grapher")
ACT.SetItems(mapPerson.Keys)
‘ACT.SetItems(mapPerson.Keys)
End Sub
B4X:
Sub ACT_ItemClick (value As Int) ' Used with a Map, must fix
Dim Map1 As Map = CreateMap("alan": 0, "robert": 1, "tony": 2)
Dim value As Int = Map1.GetDefault(ACT.Text, 0)
' Map1.GetDefault(ACT.Text, 0)
Label1.Color = Colors.Gray
End Sub