AutoCompleteTextView search part of word instead of full word

前端 未结 1 917
悲哀的现实
悲哀的现实 2021-01-06 10:15

I have an AutoCompleteTextView, and it works nicely, until I add a space to my input. If I had, say, a list of many historical events (Battle of Britain (1940),

1条回答
  •  执念已碎
    2021-01-06 10:56

    Use a custom Adapter which implements Filterable, in the getFilter() method . Use String.contains() for your requirement

    0 讨论(0)
提交回复
热议问题