list item overlapped to the first item and so on when scrolling #81

Closed
opened 2025-11-07 07:18:44 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @arpitjoshi08 on GitHub (Oct 6, 2017).

i am was using this library for creating view like cards https://github.com/loopeer/CardStackView
its working well but slow down issue in scrolling when item size large. then i used this code with recyclerview .
` 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);
        if (position != 0)
            outRect.top = mSpace;
    }
}`

now using this its working fine and view looking like cards and items or RecyclerView has overlapped.
now i need to create view like stack, when i scrolled item bottom to top then all items overlapped to first item and so on like lib showing in link. how can be done using RecyclerView?

Originally created by @arpitjoshi08 on GitHub (Oct 6, 2017). i am was using this library for creating view like cards [https://github.com/loopeer/CardStackView](url) its working well but slow down issue in scrolling when item size large. then i used this code with recyclerview . ` 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); if (position != 0) outRect.top = mSpace; } }` now using this its working fine and view looking like cards and items or RecyclerView has overlapped. now i need to create view like stack, when i scrolled item bottom to top then all items overlapped to first item and so on like lib showing in link. how can be done using RecyclerView?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-android-ui#81