平时使用CardView默认是带有阴影效果的,如果不想要阴影效果,只需要将以下属性设置为0即可:
app:cardElevation="0dp"
app:cardMaxElevation="0dp"
<androidx.cardview.widget.CardView
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="188dp"
android:background="@color/transparent"
android:foreground="?android:attr/selectableItemBackground"
app:cardCornerRadius="12dp"
app:cardElevation="0dp"
app:cardMaxElevation="0dp">
</androidx.cardview.widget.CardView>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)