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

What just happened?

Two important things happened here.

Firstly, we defined an Animator in XML. This is kind of useful, but it's not such an easy format to work with as the tween animation format. However, FragmentTransactions do not allow us to specify a tween that was declared in Java, so we have to take this route.

Secondly, we used the Animator on a FragmentTransaction, so that it would be applied when our new Fragment was added to the screen.

Oh yeah, and those interesting facts about the solar system? Some of them aren't true. I'm sorry.

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