Monday, November 16, 2015

How to add the ripple effect on any view

All you have to do is set your background to the ripple effect:
android:background="?attr/selectableItemBackground"
You can get the ripple effect on a TextView for example. (you can also try settings it on the android:foreground if background doesn't fit your use. If you do, the background has to be a solid color or @null though, so keep that in mind or using foreground won't work.)

Have fun !

No comments:

Post a Comment