Here's a simple app that I wrote recently to see how background processing affects frame rate. There's nothing too complicated going on in the app, but it seemed worth publishing to show how to do various things in Android, such as:
- Using a single ValueAnimator (3.0+ API) to animate several objects independently
- Manipulating the transform of Canvas to move/rotate objects
- Using the GPU to provide faster rendering (3.0+ capability)
- Tracking the current frames per second performance
Here's the code (a zipped Eclipse project for the app). You should be able to build/run it for any 3.0+ target device.
Note: this is not the Renderscript app that I showed in a recent user group talk. That other app is based on this one, but uses Renderscript to animate and draw the droidflakes. This version just uses the standard Canvas API to draw bitmaps. I'll post the Renderscript version soon.