5.3.12. Applying an Animation to a View

When the user makes an incorrect choice, the app shakes the flag by applying an Animation (package android.view.animation) to the ImageView. We use AnimationUtils static method loadAnimation to load the animation from an XML file that specifies the animation’s options. We also specify the number of times the animation should repeat with Animation method setRepeatCount and perform the animation by calling View method startAnimation (with the Animation as an argument) on the ImageView.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.87.83