Is there a TweenMax equivalent in Java


I'm still relatively new to Java and Android development, so I'm still unfamiliar with the multitudes of libraries available for use, particularly for animation. Where I'm from (the Flash world), we have access to several 3rd-party tweening engines that make life very easy for us when we want to programmatically move things around the stage without relying on the (vastly inferior) built-in Adobe tween APIs. One of the most popular is Greensock's TweenMax

Looking at the way Android handles tweening natively, it appears to be very cumbersome compared to what I'm used to. I'm curious if there's a TweenMax-equivalent library out there for Android that makes animation sequencing equally easy to write in-code, with the benefits of smart intellisense, rather than having to write them all out in an external animation.xml file in the res folder.

Sorry to reply so lately to this thread, but there is a more framework-independent answer to your question: the java Universal Tween Engine.

enter image description here

This library started as a way to mimic TweenMax/Lite functionality in any java project, and ended as a complete, independent, tweening engine. It is optimized for Android (no dynamic allocation), but can be used in virtually every java project, being a Swing UI or an OpenGL game...

You shouldn't be lost if you come from TweenMax world, since the base syntax is quite similar:, POSITION, 1000).target(20, 30).ease(Elastic.OUT).start(myManager);

Timelines are a bit different though, but are still easy to understand:

    // First, set all objects to their initial positions

    // Wait 1s

    // Move the objects around, one after the other

    // Then, move the objects around at the same time

    // And repeat the whole sequence 2 times
    .repeatYoyo(2, 500)

    // Let's go!

Hope that helps :)

You don't have to use XML files, you can use Animation, AnimationSet and the various Interpolator implementations. Android 3.0 however provides a much more powerful animation API.

Actually, I think I have found something close to what I was asking for. There's a port of Cocos2D for Android here : Cocos2D for android

It's not completely bug free (thinking mostly of the particle system here), but it offers a wide range of animation and display functions for the sorts of things you'd use Greensock for. It even comes with a Box2D port on top of it all.

This video can help you solving your question :)
By: admin