Android Question SearchView-question about index

Discussion in 'Android Questions' started by kisoft, May 6, 2019.

  1. kisoft

    kisoft Active Member Licensed User

    Last edited: May 6, 2019
  2. ronell

    ronell Well-Known Member Licensed User

    put the items in a list.. then you can find the index using this code

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


    Sub SearchView1_ItemClick(Value As String)
       
    log(List1.IndexOf(Value))
           
         
    End Sub
     
  3. kisoft

    kisoft Active Member Licensed User

    @ronel..Thank you very much for pointing out, now it works as it should.
    Code:
    Sub SearchView1_ItemClick(Value As String)
        
    dim idx as int
        idx=cities.IndexOf(Value)
    end sub
     
    Last edited: May 6, 2019
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice