O'Reilly logo

Android 3.0 Animations by Alex Shaw

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interpolating animations

These animations look a bit rigid, don't they? They just move from one place to the next robotically, but most real-world objects have a bit of rhythm, due to the physics underpinning the way they are moved. Let's make our blocks move as if they were real-world objects, by adjusting the timing of their tweens.

Think back to when we were defining animations; do you remember seeing the line android:interpolator="@android:anim/linear_interpolator" when we were defining the translate and rotate tweens? This interpolator just moves the object from the start point to the end point (or rotation) at a steady rate.

Next, we are going to use some different interpolators to achieve a more natural animation effect.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required