Android Ripple Background Drawable
10 Feb 2017If you want to add Ripple effect when user click on your view, add this as a background :
<ImageView
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
/>
You may want to add clickable=true
attribute to make sure that the view can be clicked. This trick only apply to Android v21 (Lolipop) and up. If you want to achieve this effect in earlier version, you need to define the animation & drawable yourself or use a third party library.