I am loading around 20,000 strings from a xml, besides that it takes very much time until the app really makes me a suggestion, when I type Cra it shows me the first suggestion Valea Crabului and i have Craiova in the strings but that is suggested later.
How can a AutoCompleteTextView suggest me only the words that match the whole word ?
If you are using
ArrayAdapterfor yourAutoCompleteTextView, than here you can see default implementation of the filter forArrayAdapterhttps://github.com/android/platform_frameworks_base/blob/master/core/java/android/widget/ArrayAdapter.javaFrom the inner class
ArrayFilterofArrayAdapter:You see filter doesn’t sort matched items by relevance you require, you have to write your own filter for your adapter.
Instead
you may need to use
so your filter will add values starting with your suggested string at the top of results as the most relevant filter result.