Android Ripple Background Drawable

If 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.

comments powered by Disqus