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

Customizing the interpolator classes

We have seen that interpolators are used in various guises in Android animations. Interpolators provide a characteristic motion to a simple animation, and it is sometimes useful to take advantage of them to provide new types of motion.

What do interpolators do?

You may have wondered to yourself how an interpolator actually works when you dig into the internals of it. Essentially, it provides a multiplier for any animation that it is associated with. It takes in a floating-point number between 0 and 1, and it gives back a floating-point number between 0 and 1.

The simplest example is a LinearInterpolator, which just gives back the number it was given. A more complex example is the AccelerateInterpolator, which ...

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