Listing 1116 resanimanimatedxml

<?xml version="1.0" encoding="utf-8"?>

<set xmlns:android="http://schemas.android.com/apk/res/and-

roid" android:interpolator="@android:anim/accelerate_interpolator">

<translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="5000" />

<alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="3000" /> <rotate android:fromDegrees="0"

android:toDegrees="-45"

android:toYScale="0.0"

android:pivotX="50%"

android:pivotY="50%"

android:startOffset="700"

android:duration="3000" />

<scale android:fromXScale="0.0"

android:toXScale="1.4"

android:fromYScale="0.0"

android:toYScale="1.0"

android:pivotX="50%"

android:pivotY="50%"

android:startOffset="700"

android:duration="3000"

android:fillBefore="false" />

The main activity is shown in Listing 11.17. It is a simple activity that creates an Animation object by using the AnimationUtils to load the animationSet defined in the animation. Then, every time the user clicks on the button, it uses the image view object to run animation by calling the startAnimation() method using the Animation object already loaded.

Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook


Post a comment