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

Summary

In this chapter, we learned how to create animations programmatically, using surfaces and their built-in drawing tools. We used a game loop pattern to update the display.

Specifically, we covered the following:

  • Game loops, and the components of a handmade application
  • How a surface interfaces with the views system
  • How we can get a surface using SurfaceHandlers
  • Using Canvas and Paint methods to create a wealth of different graphical elements
  • Optimizing the game loop to get more frames per second

We also learned that we could take advantage of a surface and a game loop to get better performance, or to make our animation more efficient.

Our skills with surfaces will come in handy in the next chapter, which is all about creating live wallpapers. These ...

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