开发者

how to do a filter search for the heading in listview

开发者 https://www.devze.com 2023-04-06 06:47 出处:网络
i got a listview that consists of thingsToDo[] time[] deadline[] and i want to search by the thingsToDo[].

i got a listview that consists of thingsToDo[] time[] deadline[] and i want to search by the thingsToDo[].

I tried doing filter search but it will filter the whole listvie开发者_如何转开发w, not what i really want.

Helps will be greatly appreaciate


you Override toString of object that is in your collection and set:

 listView.setTextFilterEnabled(true);

When set to true, the list will filter results as the user types. The List's adapter must support the Filterable interface for this to work. Must be a boolean value, either "true" or "false". This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type. This corresponds to the global attribute resource symbol textFilterEnabled.

and also refer :: this

0

精彩评论

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