I am trying to play a ripple effect (from Android L) on a view at a certain time (not on the view being touched). To be specific, when the user successfully changes some text, I want a certain view to play a green ripple effect to show success. Is there any way to do this?
I have tried putting a RippleDrawable in an Animation, putting the RippleDrawable as the background for my "success view." But, I can't figure out how to play the ripple animation as I have described.
P.S. My project is Android L only right now, so I am not worried about backwards compatibility.
Since your mask is just a solid rectangle, you can simplify your ripple XML to:
You can manually trigger a ripple effect by forcing a view in and out of the pressed state.