2016-08-21 68 views
4

我需要在CardView之間添加空格。我試過使用card_view:cardUseCompatPadding,它不起作用。任何幫助?CardView之間的空格

<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"> 
+0

如何定期填充/利潤率?取決於您希望添加空間的位置。 – Vucko

回答

3
android:layout_marginBottom="4dp" //4dp is recommended 
+0

非常感謝。有用 :) – user6730398