Clone this repo:
  1. c148359 [LSC] Add LOCAL_LICENSE_KINDS to external/universal-tween-engine am: e35f88c0e9 am: 1939c1b32f am: e9d0a2a78e by Bob Badour · 11 months ago android-s-v2-preview-1 android12--mainline-release android12-dev android12-qpr1-d-release android12-qpr1-d-s1-release android12-qpr1-d-s2-release android12-qpr1-d-s3-release android12-qpr1-release master android-12.0.0_r16 android-12.0.0_r18 android-12.0.0_r19 android-12.0.0_r20 android-12.0.0_r21 android-12.0.0_r26 android-12.0.0_r27 android-mainline-12.0.0_r4 android-s-v2-beta-2 android-s-v2-preview-2
  2. e9d0a2a [LSC] Add LOCAL_LICENSE_KINDS to external/universal-tween-engine am: e35f88c0e9 am: 1939c1b32f by Bob Badour · 11 months ago
  3. 1939c1b [LSC] Add LOCAL_LICENSE_KINDS to external/universal-tween-engine am: e35f88c0e9 by Bob Badour · 11 months ago android-s-beta-4 android-s-beta-5 android-s-beta-1 android-s-beta-2 android-s-beta-3
  4. e35f88c [LSC] Add LOCAL_LICENSE_KINDS to external/universal-tween-engine by Bob Badour · 12 months ago android-s-preview-1
  5. db23634 Add METADATA to universal-tween-engine: Apache2=NOTICE am: 24b16880d9 am: b2ad896a29 am: c33555f7f5 am: 2eda1265a1 am: bbec3b29d6 by Bob Badour · 1 year, 9 months ago

Check out the demo!


The Universal Tween Engine enables the interpolation of every attribute from any object in any Java project (being Swing, SWT, OpenGL or even Console-based). Implement the TweenAccessor interface, register it to the engine, and animate anything you want!

In one line, send your objects to another position (here x=20 and y=30), with a smooth elastic transition, during 1 second).

// Arguments are (1) the target, (2) the type of interpolation, 
// and (3) the duration in seconds. Additional methods specify  
// the target values, and the easing function., Type.POSITION_XY, 1.0f).target(20, 30).ease(Elastic.INOUT);

// Possibilities are:; // interpolates from the current values to the targets
Tween.from(...); // interpolates from the given values to the current ones
Tween.set(...); // apply the target values without animation (useful with a delay); // calls a method (useful with a delay)

// Current options are:

myTween.repeat(2, 0.5f);
myTween.repeatYoyo(2, 0.5f);

// You can of course chain everything:, 0.5f).start(myManager);

// Moreover, slow-motion, fast-motion and reverse play is easy,
// you just need to change the speed of the update:

myManager.update(delta * speed);

Create some powerful animation sequences!

    // 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
    // with a 0.5s pause between each iteration
    .repeatYoyo(2, 0.5f)

    // Let's go!

You can also quickly create timers:;

Main features are:

  • Supports every interpolation function defined by Robert Penner.
  • Can be used with any object. You just have to implement the TweenAccessor interface when you want interpolation capacities.
  • Every attribute can be interpolated. The only requirement is that what you want to interpolate can be represented as a float number.
  • One line is sufficient to create and start a simple interpolation.
  • Delays can be specified, to trigger the interpolation only after some time.
  • Many callbacks can be specified (when tweens complete, start, end, etc.).
  • Tweens and Timelines are pooled by default. If enabled, there won't be any object allocation during runtime! You can safely use it in Android game development without fearing the garbage collector.
  • Tweens can be sequenced when used in Timelines.
  • Tweens can act on more than one value at a time, so a single tween can change the whole position (X and Y) of a sprite for instance !
  • Tweens and Timelines can be repeated, with a yoyo style option.
  • Simple timers can be built with
  • Source code extensively documented!

Get started and documentation index

Detailed documentation with code snippets and examples is available for the following topics:

  • Get started --- A step-by-step example to get you started, with code

  • The TweenAccessor interface --- Know how to implement it

  • Tweens and options --- See what are the possibilities

  • Timelines and options --- Learn how to build powerful sequences

  • Animating Android apps --- See how to use the engine with Android UIs

Where can I ask for help?

There is a dedicated forum for you:

Also, the following link will guide you to a discussion thread that started it all: