开发者

Android AutoCompleteTextView, how to seperate query key and value (label)

开发者 https://www.devze.com 2023-03-02 03:38 出处:网络
I want to build an AutoCompleteTextView to filter on my big list. The list have two attributes, one is short representation of the list item , and another one is th开发者_高级运维e full style of the i

I want to build an AutoCompleteTextView to filter on my big list. The list have two attributes, one is short representation of the list item , and another one is th开发者_高级运维e full style of the item, for example, one item named "DoYouKnow", and its short style may be "dyk".

When user type "dy" or "doy", it would both match the item "DoYouKnow", and the AutoCompleteTextView should show "DoYouKnow" up, how can I do that?


Try using hashmap with key and value


OK, i get it done by implementing my own filter in adapter class.

0

精彩评论

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