A (175)

(Tuis.) #1

382 CHAPTER 10: Android Animation: Making Your UI Designs Move



  1. Once you complete the animImageView.setImageResource( ) method
    configuration, which is shown error-free in Figure 10-23, the next thing
    that you will need to do, once you have installed the correct foreground
    (source) image plate into the ImageView object, is to remove the
    imageviewwhitering.png background image, so that the friendship 3D
    spaceship can float freely in front of your galaxy image. Do this by setting
    the value for your background parameter to null, which signifies unused
    or not currently set, using a .setBackground(null) method call, as shown
    in Figure 10-23. When you do this, you will get an error highlight informing
    you that you need to set the Minimum SDK Level to 16 for your application,
    which we'll be doing in the next section of the chapter.

  2. Since the Animation asset that we designed in the previous section
    is for imageButtonTwo, open up this event handler structure as
    shown in Figure 1 0-2 2 , call a .setImageResource( ) method, off of the
    animImageView object, and find the reference to the friendship.png asset
    that you copied into the drawable-xhdpi folder from the book
    assets repository.


Figure 10-22. Set the animImageView ImageView to the friendship image using the .setImageResource( ) method

Free download pdf