Calling a search or filter in an Android Android block?

I am using Android compatibility library and I am using ListFragment. I configured it to display the items in my list pretty well. However, now I want to give users the ability to filter / search for data. How do I configure this? Isn't that the case with a regular ListView? And if so, am I putting all my code for this in a ListFragment or parent activity?

+7
source share
1 answer

You need your adapter to adapt the Filterable interface and then override the getFilter () method. In fact, the ArrayAdapter offers a simple Filtrable implementation, you can check the source code of the ArrayAdapter to find out how it works.

0
source

All Articles