Reputation: 1235
I create a list with a simple RecyclerView and CardView without any style properties.
<android.support.v7.widget.RecyclerView
android:id="@+id/shops_list"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
And I get the expected result when I run in android 4.2.2 device like the following screenshot.
But, when I run in Android version 6.0.1, there is no space between CardView item like the following.
I would like to get some space between CardView item like the above screenshot. Is need to add space or divider height manually? Please help :-)
Upvotes: 0
Views: 885
Reputation: 2496
Use app:cardUseCompatPadding="true"
in CardView
.
CardView adds padding in platforms pre-L to draw shadows. In L, unless you set
useCompatPadding=true
, there should not be any gap.
Upvotes: 4