Hi everyone, i would like to ask if how can i pass the value of the SearchView to an EditText. I mean is there a way that the EditText can hold the value from the searchView?
Here's my code but it doesn't display the SearchView to my EditText.
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layout1")
sv.Initialize(Me, "sv")
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
EditText1.text= sv
End Sub
I mean, the SearchView will be my edittext (The list will be on the edittext) not when I choose the value of the listview and then pass the chosen item on the edittext.