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.
Asked
Active
Viewed 187 times
0
-
You have just one item? Is it a text view? – Ashwini Saini Sep 01 '18 at 14:28
-
Post your adapter and layout xml that you showing using recycler view – Ashwini Saini Sep 01 '18 at 14:29
-
Your question is not very clear. Add more details and the code you have till now – Sourabh Sep 01 '18 at 14:51
-
seems like carousel behavior you need? – hemen Sep 01 '18 at 15:01
-
yes ..I have only one item.. that is image view – Atul Dk Sep 01 '18 at 16:09
2 Answers
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
-
Thanks Ivan ...But i've only one item in recycle view. Please find the updated question and recycle view image – Atul Dk Sep 01 '18 at 14:12
-
0
I created a sample app with this functionality and here is code. Let me know if you need some explanation.
You need to create A custom layout manager and Item Transformer

Aditya
- 371
- 3
- 8
-
How can we make it cyclcic? means clockwise and anticlockwise it should have to scroll. – Atul Dk Sep 01 '18 at 21:15
-
-
-
means if i scroll 1st time left. last item of list should have to display – Atul Dk Sep 02 '18 at 05:24
-
finally, I found the solution. need to add layoutManager.attach(recyclerView, Integer.MAX_VALUE/2); – Atul Dk Sep 03 '18 at 11:47