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—animating bubbles on a surface

A popular psychologist has discovered that the most relaxing thing in the world is watching bubbles rise up from the bottom of a glass. Previously, people thought that it was the liquid contents of the glass that were relaxing, but now science has told us that it is the bubbles that give us that soothing feeling.

Well we've had a busy day writing Android apps, and now it's time to unwind by watching some nice relaxing bubbles. But first we have to write another Android application to see them! Well, writing Android apps is kind of relaxing.

In this Activity, we will subclass SurfaceView to get us a direct surface onto the screen, and then create a game loop thread that will draw animated bubbles. ...

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