任何人都可以向我解释如何在 CardView 中实现在 Google I/O 2014 上展示的一些视觉触摸反馈。
这是我在 XML 中使用 CardView 的方式,可能我缺少一些小东西,所以我只是想知道是否有人可以帮助我?
<!-- A CardView -->
<android.support.v7.widget.CardView
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/CardView_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
card_view:cardCornerRadius="4dp"
android:elevation="2dp">
<LinearLayout
android:id="@+id/LinearLayout_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:onClick="RunSomeMethod"">
<!-- Main CardView Content In Here-->
</LinearLayout> </android.support.v7.widget.CardView>