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

Time for action—making the stick man interactive

Our little man looks a bit lonely dancing by himself, doesn't he? Wouldn't it be nice if you could join in with the dancing? In this section, we will add buttons to the animation, to allow a user to change the dance moves that the stick man is doing.

In order to make the animation interactive, you're going to have to take the existing animation and split it up into its individual dance moves. There's a trick here: each dance move is exactly a second long. That means that the first 12 frames are the dance-left animation, the second 12 frames are the dance-right animation, and the final 12 define the jump animation.

We will make two new animations from the existing animation, one for dancing left and ...

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