A (175)

(Tuis.) #1
CHAPTER 10: Android Animation: Making Your UI Designs Move 391


  1. Next, add a line of space under the tag, use the left-facing chevron
    to popup the helper dialog, and double-click on the child tag option,
    or type the opening container characters, to prepare
    to add parameters to the AlphaAnimation object child tag container. If you
    want to see the parameters which are allowed inside of the alpha tag, use the
    android: work process to popup the parameter helper dialog.

  2. Next, you need to add parameters to animate opacity from 100% to 67%
    and back (repeatMode="reverse") over a 2250 -millisecond duration. Set the
    pivot point to the middle (50%), and set a repeatCount of infinite, using the
    following XML markup parameters, as shown in Figure 10-34:


<alpha android:fromAlpha="1.0" android:toAlpha="0.67" android:duration="2250"
android:repeatCount="infinite" android:repeatMode="reverse" />

Figure 10-34. Add an child tag and configure it to fade from 100% to 67% and then back again (reverse)


Figure 10-33. Add a child tag and configure to scale from 100% down to 50% and back up again (reverse)

Free download pdf