0

Not entire sure if this is possible, but I'm implementing a "CardStack" effect from this SO with my own custom RecyclerView.ItemDecoration class. I noticed that the overlapping item is drawn such that RecyclerView item at position 0 is at the bottom,following by 1, 2, 3..etc.

Is there a reversed way such that item at position 0 is at the top most?

Community
  • 1
  • 1
user3277633
  • 1,891
  • 6
  • 28
  • 48

1 Answers1

3

Maybe you could use setStackFromBottom and then in your adapter override getItem to return the items in reverse order. Your view should draw from the bottom up but the items will remain in the same order.

crackpotHouseplant
  • 380
  • 1
  • 3
  • 12
  • 2
    To clarify, I set the LinearManager to have `setStackFromEnd` and `setReverseLayout` as both true, then reverse the binding index in my adapter. – user3277633 Oct 23 '16 at 23:25