我在 android studio 中有一个 Material Card View,当我点击它时,它具有默认的灰黑色波纹,我可以将波纹颜色更改为其他颜色,例如 colorPrimary。
下面是我的材料卡视图
<com.google.android.material.card.MaterialCardView
android:id="@+id/mcv_advert_preview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:theme="@style/MaterialTheme"
app:cardCornerRadius="5dp"
app:cardElevation="1dp"
app:cardUseCompatPadding="true"
app:contentPadding="10dp"
app:strokeWidth="1dp">
</com.google.android.material.card.MaterialCardView>