Answer the question
In order to leave comments, you need to log in
How to implement search in RecycleView with subheaders?
There was a need to implement a search in RecycleView so that the search result is displayed as
HEADER
item
item
HEADER
item
item
I did not find any solutions, the only thought is, each time you search, re-form the List in a cycle and display it in RecycleView. Maybe there is a better solution?
Answer the question
In order to leave comments, you need to log in
Is the question in search, list or subheaders? These three things are generally perpendicular and do not affect each other in fact. You implement the search as you like, get a new list, use DiffUtil to push the changes into the adapter.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question