I need ripple effect for buttons. Currently I'm using ripple background for buttons in lollipop and upward devices using an xml in v21 directory and it is working fine, but I also need a ripple effect for pre-lollipop devices.
I used some custom libraries for acquiring ripple effect for pre lollipop devices. For example I used com.balysv:material-ripple:1.0.2
library by following how to create ripple effect for pre-lollipop. In there they use this library which uses a custom view to wrap the button.
So when I use that for my curved, shaped buttons in pre lollipop, the result would be like this...
As you can see, the ripple effect goes out side of the button stroke boundaries. Is there is a way to resolve this?
Also, is there a way to acquire ripple effect using android's default support libraries instead of using custom 3rd party libraries for pre lollipop devices?