tushar narang tushar narang - 3 months ago 27
Android Question

Margin between items in recycler view Android

Hi I am Following this tutorial

http://www.journaldev.com/10024/android-recyclerview-and-cardview-example-tutorial

Now i am facing a weird issue the margin between each cardview item inside recycler view is way too much.

ISSUE

How to reduce the Margin between each item of cardview placed inside recycler view.

enter image description here

Answer

I faced similar issue, with RelativeLayout as the root element for each row in the recyclerview.

To solve the issue, find the xml file that holds each row and make sure that the root element's height is wrap_content NOT match_parent.

Comments