0

我在我的应用程序ImageView内部使用MaterialCardView

    <com.google.android.material.card.MaterialCardView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:cardCornerRadius="10dp"
    app:cardElevation="0dp"
    app:strokeColor="#FF0000"
    app:strokeWidth="1dp">

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop" />
</com.google.android.material.card.MaterialCardView>

如您所见,卡片视图的内容(黑色)可以在角落的边框之外看到。如何解决这个问题?我已经尝试添加app:contentPadding="1dp",但它不能解决角落的问题。

角落问题

4

0 回答 0