在棒棒糖之前的设备中,当在卡片视图上按下时,它会显示一个难看的灰色矩形,那么如何只为没有卡片阴影的卡片内容设置颜色?
这是我的 cardView XML
<android.support.v7.widget.CardView
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
card_view:contentPadding="50dp"
card_view:cardElevation="5dp"
android:clickable="true"
android:foreground="?android:attr/selectableItemBackground">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
</android.support.v7.widget.CardView>
谢谢!