I was testing around, and came up with this.

I was testing around, and came up with this.

Animations: ‘fade’ and ‘slide’. If you don’t specify any (or a wrong one) a random one will be played each time.

Before you ask: the way this script works only allow those two animations. I’m sure it is possible to use others (maybe even create custom ones) but I couldn’t find a way.

]]>

18 Commentsto I was testing around, and came up with this.

  1. Anonymous says:

    < ![CDATA[

    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);

    ]]>

  2. Anonymous says:

    < ![CDATA[

    +TrianguloY I have a similar script with a completly different approach:




    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());

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Lukas Morawietz I tried a similar thing, but no luck (didn’t know the ActivityOptions)


    Thanks for the demo! I’ll test more 😀

    ]]>

  4. Anonymous says:

    < ![CDATA[

    This is really nice

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Sweet

    ]]>

  6. Anonymous says:

    < ![CDATA[

    This script don’t work for the Google App for me.

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Which one is the ‘Google App’ for you?

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Google Now

    ]]>

  9. Anonymous says:

    < ![CDATA[

    True, but that seems to be because of the app (strangely, it works with an old version of Google now)


    I can’t do anything, you can check Lukas Morawietz​ script, maybe that one works.

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Ok, thanks.


    Your script is awesome.

    ]]>

  11. Anonymous says:

    < ![CDATA[

    TrianguloY it runs too fast, you barely notice the animation. Is there a way to change the duration of the animation?

    ]]>

  12. Anonymous says:

    < ![CDATA[

    Gabriel Garcia​ no from script. (Using this code I mean)


    However you can make the Android animations slower (in the developer settings. If you don’t see this option google it)


    But keep in mind this will make ALL animations slower.

    ]]>

  13. Anonymous says:

    < ![CDATA[

    thanks TrianguloY . I try with custom animation on code, but overridePendingTransition need the resource id. So is not the way either.

    ]]>

  14. Anonymous says:

    < ![CDATA[

    Gabriel Garcia if you have a custom animation, try with Lukas’s code, I think you can use a custom transition there

    ]]>

  15. Anonymous says:

    < ![CDATA[

    TrianguloY No, I think is the same problem, Lukas Morawietz ‘s code use makeScaleUpAnimation, if you want custom animation must use makeCustomAnimation(Context context, int enterResId, int exitResId) and that method ask for resource id too. But I’m not sure if there is another way.

    ]]>

  16. Anonymous says:

    < ![CDATA[

    TrianguloY​ does this script work for you since the last update? I can’t get it to work now.

    ]]>

  17. Anonymous says:

    < ![CDATA[

    Sergio Azar for some reason both fade and slide make a ‘fade’ animation.


    I can’t make anything. Did you tried Lukas’s alternative code?

    ]]>

  18. Anonymous says:

    < ![CDATA[

    Yeah I tried Lukas Morawietz​ code, it didn’t work either.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *