I'm trying to read a file and add its content to a AutoCompleteEditText like in SearchView.
But it throws a compile time error 'Cannot assign void value.' on the line index = ACT.SetItems(countries)
It works fine on SearchView though. Is there a different method to add a list from a file to an AutoCompleteEditText?
Thank you
B4X:
Sub Process_Globals
Dim index As Object
End Sub
Sub Globals
Dim ACT As AutoCompleteEditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layout1")
Dim countries As List
countries = File.ReadList(File.DirAssets, "cities.txt")
index = ACT.SetItems(countries)
End Sub
But it throws a compile time error 'Cannot assign void value.' on the line index = ACT.SetItems(countries)
It works fine on SearchView though. Is there a different method to add a list from a file to an AutoCompleteEditText?
Thank you