could anybody explain to me how to implement some of the visual touch feedback that was demonstrated at Google I/O 2014 within a CardView.
Here is how I am using the CardView in XML, there is probably something small that I am missing, so I just wondered if anyone could help me?.
<!-- 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>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…