Closed jhonvidal closed 9 years ago
Hi, EasyAdapter
extends BaseAdapter
so it cannot be cast to an ArrayAdapter
.
If you want to use getFilter()
you will have to create your own adapter that extends BaseEasyAdapter
and implements android.widget.Filterable
thanks !!
Here's a gist for those who want to use a filter for RecyclerView
:
https://gist.github.com/MFlisar/846e9607ffb6b330701f
It supports animations for insert, delete and move.
just call
adapter.filter(new IPredicate<T>() {
@Override
public boolean apply(T data) {
// return true if data should be part of the filtered list
}
});
Btw, you can include this directly into your library if you like it and want to...
How to turn ArrayAdapter? to Acknowledge getFilter() How to implement a search EasyAdapter?
Help Please :)