1
我似乎無法增加ListView中CardView元素之間的差距。我試圖在CardView中添加android:layout_marginBottom="16dp"
,但這沒有任何作用。我使用SDK 23.任何想法我可以做什麼?Android:ListView中的CardView元素之間的差距
這裏是卡片佈局:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_login_form"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp" <!-- Not Working -->
card_view:cardCornerRadius="@dimen/cardview_default_radius"
card_view:cardElevation="@dimen/cardview_default_elevation"
card_view:cardUseCompatPadding="true"
card_view:contentPadding="@dimen/abc_action_bar_content_inset_material">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/layout_dato"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="@string/tip_detail_date"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/text_tip_dato"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:textSize="14sp" />
</LinearLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
我在那裏e代碼... – Ambran
然後嘗試添加:card_view:cardPreventCornerOverlap =「false」 –