0

I have Horizontal cyclic ReacycleView. but I want in recycle view's middle item(ImageView) height be greater as compared to other side items. Recycle view items That means if any item in the center of RecycleView, it's height should be greater in RecycleView itself.

Atul Dk
  • 15
  • 7

2 Answers2

0

You can use a different layout for your middle item by implementing getItemViewtype() in your adapter. Similar question and answer here should point you in the right direction.

Ivan Wooll
  • 4,145
  • 3
  • 23
  • 34
0

I created a sample app with this functionality and here is code. Let me know if you need some explanation.

Screenshot

You need to create A custom layout manager and Item Transformer

CenterLayoutManager

Repository

ScaleTransformer

Aditya
  • 371
  • 3
  • 8