Reputation: 2155
I have the AutoCompleteTextView
with ArrayAdapter
of Strings
and from first look it works fine, but there is one strange things:
When I write "auto" I get the suggestion Auto Repair/Mechanic
, but when I write "mechanic" or "mec" or "mech" I don't get this suggestion. Maybe somebody had similar problem?
Upvotes: 0
Views: 433
Reputation: 1494
AutoCompleteTextView searches from the start of the string and this is the reason mechanic word doesn't give you any result. To implement what you want use custom Adapter which implements Filterable like suggested here: AutoCompleteTextView search part of word instead of full word.
Link with example is here: http://www.sarpcoskun.com/2008/08/autocompletetextview-with-simpleadapter.html
Upvotes: 2