Android Question SearchView-question about index

ronell

Well-Known Member
Licensed User
Longtime User
put the items in a list.. then you can find the index using this code

B4X:
Dim List1 As List
List1 = File.ReadList(File.DirDefaultExternal, "items.txt")


Sub SearchView1_ItemClick(Value As String)
   
log(List1.IndexOf(Value))
       
     
End Sub
 
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
@ronel..Thank you very much for pointing out, now it works as it should.
B4X:
Sub SearchView1_ItemClick(Value As String)
    dim idx as int
    idx=cities.IndexOf(Value)
end sub
 
Last edited:
Upvote 0
Top