User Tools

Site Tools


script_launch_animation

**This is an old revision of the document!** ----

A PCRE internal error occured. This might be caused by a faulty plugin

====== About the script ====== * Purpose : These scripts will change the animation when launching shortcuts * Authors : [[https://plus.google.com/+LukasMorawietz|LM13]] and TrianguloY * Current Version : 1.0 * Link : ====== Changelog ====== * Version 1.0 (30/4/2015): initial release in wiki ====== How to use the script ==== * Set one of these Scripts to the tap action of an item to choose between fading and sliding, set "fade" or "slide" in the script run Data ====== Issues and hints ====== * //please report all bugs in the g+ community// ====== Scaling Animation ====== <sxh javascript;>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()); </sxh> ====== Sliding or fading Anination ====== <sxh javascript;> LL.bindClass("android.R"); LL.getEvent().getItem().launch(); var d=LL.getEvent().getData(); if(d!="fade"&&d!="slide")d=Math.random()>0.5?"fade":"slide"; var animIn; var animOut; if(d=="fade"){ animIn=R.anim.fade_in; animOut=R.anim.fade_out; } if(d=="slide"){ animIn=R.anim.slide_in_left; animOut =R.anim.slide_out_right; } LL.getContext().overridePendingTransition(animIn, animOut); </sxh>

script_launch_animation.1430413758.txt.gz · Last modified: 2015/04/30 17:09 by lm13