Unable to remove extra space between CardView items - Scrollable RecyclerView

前端 未结 5 1059
忘了有多久
忘了有多久 2021-01-19 00:39

Folks,

I am out of options while attempting to removing extra space between cardview items in my recyclerview below is the current output. Please suggest.

5条回答
  •  醉梦人生
    2021-01-19 00:50

    All you need to do is remove the following two lines from the xml for the CardLayout:

    android:layout_marginTop="2dip"
    android:layout_marginBottom="2dip"
    

    What this does is sets the seperation between the two layouts, in this case you have 4dip (2 at the top and 2 at the bottom). You can also try to reduce it to 1 dip and verify the effect it gives you.

    Hope this helps :)

提交回复
热议问题