Elevation animation on click on CardView
问题 I want to add the elevation animation to my android.support.v7.widget.CardView , just like the material style Button s do. I've tried to set a StateListAnimator : android:stateListAnimator="@anim/selector_raise" which points to my selector in res/anim : <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="true" android:state_pressed="true"> <objectAnimator android:duration="@android:integer/config