I need recycler view where each next item below previous one. It should overlap somehow. Is it possible using recyclerview?
Asked
Active
Viewed 277 times
0
-
1Possible duplicate of [Recyclerview - Overlap items bottom to top](https://stackoverflow.com/questions/40677024/recyclerview-overlap-items-bottom-to-top) – Milind Mevada Jun 12 '18 at 09:55
-
see this lib https://github.com/Diolor/Swipecards – EL TEGANI MOHAMED HAMAD GABIR Jun 12 '18 at 10:00
1 Answers
0
All you need to add ItemdDecorator:
public class ItemDecorator extends RecyclerView.ItemDecoration {
private final int mSpace;
public ItemDecorator(int space) {
this.mSpace = space;
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
int position = parent.getChildAdapterPosition(view);
outRect.right = -mSpace;
}
}
And then while initializing recycler view:
binding.containerAction.rvGroupCallUserList.addItemDecoration(new ItemDecorator(80));

Evgeniy Rechkov
- 465
- 4
- 15