我的Android版本是4.2,我试图从删除白色边框和空间,但我作为card_view:cardPreventCornerOverlap="false"
解决方案从xmlns:app="http://schemas.android.com/apk/res-auto"
命名空间不起作用正确的Android从cardview在API级别删除白色边框4
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:elevation="0dp"
card_view:cardPreventCornerOverlap="false">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/market_item_background">
<ImageView
android:id="@+id/market_thumbnail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:scaleType="centerCrop"/>
</RelativeLayout>
这是我的应用程序,我用CardView
您是否尝试过下列属性? card_view:cardPreventCornerOverlap =“假” card_view:cardUseCompatPadding =“真” – Amir
@Amir这个选项,因为'cardUseCompatPadding'它,因为我得到微胖的cardview –
cardUseCompatPadding是**,如果我们将此属性设置为true,那么保证金作品所有版本都一样**使用-2余量,并猜测你的问题将被修复。 – Amir