Alloy Titanium widget to display Google Material ripple effect. This is completely based on a library from @Saucerdk.
gittio install com.mp5systems.rippleeffect
Download the latest release and add in your config.json, under dependencies
:
"dependencies": {
"com.mp5systems.rippleeffect": "*"
}
var rippleEffect = Alloy.createWidget('com.mp5systems.rippleeffect');
Add the rippleEffect property to your element.
"#redView":{
width: "100%",
height: 150,
backgroundColor: "red",
top: 0,
left: 0,
rippleEffect: true
}
// Add Eventlistener to the window
$.index.addEventListener("click",function(e){
if(e.source.rippleEffect){
// Here we'll pass the clicked object to our animation handler.
rippleEffect.create(e);
}
});