Android AutoCompleteTextView is very slow
I have a list of 250 thousand lines that I will put in AutoCompleteTextView
.
When I apply them to the view, the suggestion tooltips are displayed for about 10-20 seconds.
Since all values are at least 10 characters long, I also tried setting the threshold to 5, but it didn't seem to help much.
The code I used:
List<String> locations = GetLocations();
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, locations);
((AutoCompleteTextView) findViewById(R.id.txt_location)).setAdapter(adapter);
((AutoCompleteTextView) findViewById(R.id.txt_location)).setThreshold(5);
Is there a way to make this behavior faster, or am I missing another alternative approach for this case?
Edit: Now that I've been looking a little more, there seems to be no choice but to implement my own logic ( How to speed up AutocompleteTextView in Android? )
+3
source to share
No one has answered this question yet
Check out similar questions: