These are the steps to use the adapter.
- Replace the adapter extending ListAdapter with FilterableListAdapter.
- Implement the method onFilter that provides a List and the string the was passed to the filter method
- Update the list according the constraint
val filterAdapter = null // Your adapter instance here
filterAdapter.filter.filter(/*Pass your string here*/)
Thanks for the update, this is a real help. One last thing, about the constraint for filter. How can we set them just like the sample with User object where I want to filter its name attribute only. Does this current implementation filter against all the String data type attribute of an object? Is that what you mean about dynamic filter support?