implementation ‘com.android.support:cardview-v7:28’
android:foreground="?android:attr/selectableItemBackgroundBorderless"
点击会有水波效果
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:layout_margin="50dp"
app:cardCornerRadius="6dp"
android:foreground="?android:attr/selectableItemBackgroundBorderless"
app:cardElevation="3dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="标题"
android:textSize="20sp"
android:padding="10dp"
android:gravity="center"
an