====== About the script ======
* Purpose : These scripts will change the animation when launching shortcuts
* Authors : F43nd1r and [[https://plus.google.com/u/1/105066926163073195690|TrianguloY]]
* Current Version : 1.1
* Link :
====== Changelog ======
* Version 1.0 (30/4/2015): initial release in wiki
* Version 1.1 (30/11/2015: Added no animation option
====== How to use the script ====
* Set one of these Scripts to the tap action of an item
to choose between fading, sliding and none, set "fade", "slide" or "none" in the script run Data
====== Issues and hints ======
*
//please report all bugs in the g+ community//
====== Scaling Animation ======
LL.bindClass("android.app.ActivityOptions");
var e=LL.getEvent();
var i=e.getItem();
var c=e.getContainer();
LL.getContext().startActivity(i.getIntent(),ActivityOptions.makeScaleUpAnimation(c.getView(),i.getPositionX()-c.getPositionX(),i.getPositionY()-c.getPositionY(),i.getWidth(),i.getHeight()).toBundle());
====== Sliding or fading Anination ======
LL.bindClass("android.R");
LL.getEvent().getItem().launch();
var d=LL.getEvent().getData();
var choices=["fade","slide","none"];
if(choices.indexOf(d)==-1)d=choices[Math.floor(Math.random()*choices.length)];
var animIn;
var animOut;
if(d=="fade"){
animIn=R.anim.fade_in;
animOut=R.anim.fade_out;
}
else if(d=="slide"){
animIn=R.anim.slide_in_left;
animOut =R.anim.slide_out_right;
}
else if(d=="none"){
animIn=0;
animOut=0;
}
LL.getContext().overridePendingTransition(animIn, animOut);