O'Reilly logo

Pro Android 4 by Satya Komatineni, Dave MacLean

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

Custom Animations with ObjectAnimator

Earlier, we exposed you to a little custom animations on fragments. You used a custom animation to fade out the current details fragment while you faded in the new details fragment. We also told you that the stock animations under the Android SDK were few, and some don’t even work. This section will help you understand how to create your own custom animations so you can do interesting transitions between old fragments and new fragments.

The mechanism for implementing custom animations on fragments is the ObjectAnimator class. This is actually a generic feature in Android that can be applied to View objects and not just fragments. You’re only going to worry about fragments in this section, but the principles ...

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