Hi everybody, i don't know like program the control ACSearchview, i want to get the functionality of Searchview, like this code:
I would appreciate your answers, please
B4X:
Sub Process_Globals
Dim index As Object
End Sub
Sub Globals
Dim sv As SearchView
End Sub
Sub Activity_Create(FirstTime As Boolean)
sv.Initialize(Me, "sv")
sv.AddToParent(Activity, 0, 0, 200dip, 300dip)
If FirstTime Then
Dim cities As List
cities = File.ReadList(File.DirAssets, "Cities.txt")
'As an optimization we store the index as a process global variable
'and only build it once.
index = sv.SetItems(cities)
Else
sv.SetIndex(index)
End If
End Sub
Sub sv_ItemClick(Value As String)
Msgbox("Chosen value: " & Value, "")
End Sub
I would appreciate your answers, please