[英]Space Between CardView
I need to add space between CardView
. 我需要在
CardView
之间添加空间。
I tried to use the card_view:cardUseCompatPadding
and it doesn't work. 我尝试使用
card_view:cardUseCompatPadding
,它不起作用。 Any help? 有帮助吗?
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:id="@+id/all_restaurant_card_view"
android:layout_width="wrap_content"
android:layout_height="120dp"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
card_view:cardPreventCornerOverlap="true"
card_view:cardUseCompatPadding="true">
android:layout_marginBottom="4dp" //4dp is recommended
I try bellow code. 我试试下面的代码。
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginBottom="4dp"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
card_view:cardPreventCornerOverlap="true"
card_view:cardUseCompatPadding="true"
card_view:cardCornerRadius="50dp"
>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.