TabScrollAttacher
It is not a custom TabLayout or RecyclerView. It is just a helper library to attach to your RecyclerView with your TabLayout. If you don't want to go with sticky header RecyclerView or something like that, and also want to provide a good experience when your user is scrolling the content, this small library is for you.
How?
You fetch your product list and their categories. All you need to do is calcualate start index for all categories. Attacher will do the rest.
If your backend guy returns this json,
Then your offset list will be,
Then?
Then you attach.
Where?
When? ?
When you have LinearLayoutManager
, GridLayoutManager
in any orientation (horizontal or vertical) you can use this library.