Is there a possibility for a Sticky header ?
Please take a look at this. https://github.com/edubarr/header-decor
qiujayen/sticky-layoutmanager works perfectly for my needs.
interface StickyItem {
boolean isSticky();
}
class FooAdapter extends GroupAdapter implements StickyHeaders {
// ...
@Override
public boolean isStickyHeader(int position) {
Item item = getItem(position);
return item instanceof StickyItem && ((StickyItem) item).isSticky();
}
}
class FooHeaderItem extends Item<FooHeaderItem.Holder> implements StickyItem {
// ...
@Override
public boolean isSticky() {
return true;
}
}
RecyclerView.LayoutManager lm = new StickyHeadersLinearLayoutManager<FooAdapter>(ctx);
mRecyclerView.setLayoutManager(lm).
That's fantastic @iPaulPro ! I get asked about this all the time and I've always just said it's not in the scope of this library. A custom layout manager is a great solution.
Most helpful comment
qiujayen/sticky-layoutmanager works perfectly for my needs.