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
To draw selection on pre-Lollipop and post-Lollipop correctly you can use the following approach (the idea is to use inset drawable of selector with rounded corners for pre-Lollipop - sample below uses custom colors, you can change them to default):
android:foreground="@drawable/card_foreground"
post-Lollipop
drawable-v21/card_foreground.xml
drawable-v21/card_foreground_selector.xml
-
-
pre-Lollipop
drawable/card_foreground.xml (you'll need to tweak inset values according to elevation of your card)
drawable/card_foreground_selector.xml
-
-