New Ripple (ripple effect) after Android 5.0:
1.ripple_effect.xml
<?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="#FF0000" > </ripple>
How to use:
android:background="@drawable/ripple_effect"
2. Add properties directly where the control is used:
android:background="?android:attr/selectableItemBackground"