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

Comparing animators and tweens

In this chapter, we have created two animators that perform simple motion animations on a view. You could consider doing activities like this using a tween animation, and of course it would work just as well.

The relative benefits of the two are summarized as follows:

Advantages of animators

  • They are easy to map to programmatic animations, by adding a setter method or by implementing a listener
  • They do not restrict the activities that they can perform on screen to scales, translates, alpha, and rotates
  • You can add more than two keyframes to an Animator

Advantages of tweens

  • Tweens are more intuitive; they literally describe what the user will see on the screen
  • Tweens can be described in XML

Things that are common between ...

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