How to apply multiple Filters on an Adapter?

I got a listView with and a search field that calls my Adapter's getFilter().filter(keyword) func. It is working very nice, but i would like to add an other filter that searches in different tags of my listViews's objects.

So i need two filters for my Adapter, whats the best solution for this?



I suppose that you implemented the filter yourself. As you cant get two filters you could have a field in the filter that defines what kind of filtering should by applied ( you could use multiple filters in your filter).

Set you field of the filter to the value you want before using the filter.


Use the keyword to choose the filter to apply. Add on the beginning of the keyword some characters which define the filter to apply. With String.beginsWith() you can check which type of filtering has to by applied. This has to be done in the Filter itself. The caller of the getFilter.filter(keyword) has to know what characters have to by added in front of the string.

Apply Multiple Filter in Listview and also use the multi sorting in ListView, try this link:

Need Your Help

Drawing a triangle in a coordinate plane given its three sides

math html5 graph canvas drawing

The length of three sides of the triangle, a, b and c will be given, and I need to find the coordinates of the vertices. The center (probably the circumcenter) can either be the origin or (x,y).

Dumping protocol-buffers file to stdout to debug/investigate?

dump protocol-buffers protoc

I have a .proto file and a pbf (protocol buffers file). Is there anyway I can "dump" the pbf file into some sort of verbose human readable output format? I just want to be able to look inside it an...