CHAPTER 10: Android Animation: Making Your UI Designs Move 395
To be thorough, and finish up your SlidingPaneLayout UI design, create these .setText( ) method call
structures in both of your imageButtonTwo and imageButtonThree event handling structures, and
make up some similar values to the ones that you used for the Milky Way galaxy. When you test
your app in an AVD, the information and animation will now change for each of the ImageButton UI
elements when you click on them.
Procedural Animation or Frame Animation?
Finally, I wanted to discuss some of those higher-level theories, principles, concepts, and trade-offs
which will serve to differentiate the frame-based AnimationDrawable approach from the procedural
(vector) or tween Animation approach.
Frame or raster animation will tend to be memory-intensive, more than it is processing-intensive,
as each frame that is going to be placed onto the screen will be loaded into memory, so that
these frames can later be used in your application. Displaying these images from memory onto a
View is fairly straightforward, and does not require any complex calculations, so the processing
overhead is low, as it only involves moving each frame’s image asset from memory over onto the
display screen.
Figure 10-38. Change the galaxy information screen text data using the .setText( ) method call to configure TextView