In this tips, I’m going to demo yous to implement ripple effect/animation inwards your android buttons. Now, yous tin easily add together ripple effect/animation inwards your buttons, layouts, textviews, etc. as well as yous tin likewise alter its color. Note that, this ripple effect/animation volition alone demo on device running lollipop as well as above.
Here, I accept mentioned 2 method to implement ripple trial inwards your android push as well as yous tin employ inwards persuasion as well as persuasion grouping yesteryear the same way.
Method 1: To Add Ripple Effect/Animation to a Android Button
Just supercede your push background attribute alongside android:background=”?attr/selectableItemBackground” as well as your code looks similar this.
Method 2: To Add Ripple Effect/Animation to a Android Button
Using this method, yous tin customize ripple trial color. First, yous accept to practice a xml file inwards your drawable resources directory. Create a ripple_effect.xml file as well as add together next code.
And railroad train background of push to inwards a higher house drawable resources file. Final code of xml layout activeness looks similar this.