开发者

Custom dictionary for EditText

Is it possible to create a custom dictionary for an edittext? In other words, can I create a custom list and have the edittext only suggest names from that list? I don't need it popping up useless word suggestions when the user is inputting specific name开发者_如何学JAVAs of people.


Please refer to this link.

https://developer.android.com/resources/samples/SearchableDictionary/index.html

They would have implemented content provider to provide a custom input to the quicksearch. You can try taking a similar approach where in you can make a query and update the result when a user enters each alphabet in your EditText box.


Use AutoCompleteTextView and provide your dictionary in the adapter.

http://developer.android.com/guide/topics/ui/controls/text.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜