I am trying to use
android:background=\"?android:attr/selectableItemBackground\"
to get my button to do appropriate effects for each android versi
Using this method, you can customize ripple effect color. First, you have to create an xml file in your drawable resource directory. Create a ripple_effect.xml file and add following code. I use background colour as Red.
res/drawable/ripple_effect.xml
-
And set background to above drawable resource file. Final code of xml layout activity looks like this. res/layout/ripple_animation.xml
Now,ripple effect is Red colour.