Android Adding Ripple animation


Example

To enable the ripple animation in a CardView, add the following attributes:

<android.support.v7.widget.CardView
  ...
  android:clickable="true"
  android:foreground="?android:attr/selectableItemBackground">
  ...
</android.support.v7.widget.CardView>