is there a way to get current results?
meaning if my list is aa, ab, ac, ba, bb
and I type "a" I wish to get the "aa,ab,ac" into some list
for further manipulation
There is no official implemented way for it as far as I can see.
Here's a bit of code that does the trick though:
B4X:
Sub autoCompleteEditText1_TextChanged (Old As String, New As String)
If New = "" Then
Return
End If
tmpList.Clear
Dim tmpStr As String
For i = 0 To originalList.Size - 1
tmpStr = originalList.Get(i)
If tmpStr.ToLowerCase.StartsWith(New.ToLowerCase) Then
tmpList.Add(originalList.Get(i))
End If
Next
End Sub
Where originalList is the list you used for "SetItems" for the AutoCompleteEditText and tmpList is the list containing the currently displayed items.
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.