How to set a ripple effect on textview or imageview on Android?

Vasant picture Vasant · Nov 2, 2015 · Viewed 95.6k times · Source

I want to set a ripple effect on textview and imageview in Android Studio. How can I do it?

Answer

Bikesh M picture Bikesh M · Dec 7, 2015

Ref : http://developer.android.com/training/material/animations.html,

http://wiki.workassis.com/category/android/android-xml/

<TextView
.
.
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
/>

<ImageView
.
.
.
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
/>