Tweened Animation

Android can perform simple animation on a graphic, or a series of graphics. These include rotations, fading, moving, and stretching.

Source file format: XML file, one resource per file, one root tag with no <?xml> declaration

Resource file location: res/anim/some_file.xml

Compiled resource datatype: Resource pointer to an Animation.

Resource reference name:

Syntax

The file must have a single root element: this will be either a single <alpha>, <scale>, <translate>, <rotate>, interpolator element, or <set> element that holds groups of these elements (which may include another <set>). By default, all elements are applied simultaneously. To have them occur sequentially, you must specify the startOffset attribute.

<set android:shareInterpolator=boolean> // Only required if multiple tags are used.

<alpha android:fromAlpha=float android:toAlpha=float > | <scale android:fromXScale=float android:toXScale=float android:fromYScale=float android:toYScale=float android:pivotX=string android:pivotY=string > | <translate android:fromX=string android:toX=string android:fromY=string android:toY=string > | <rotate android:fromDegrees=float android:toDegrees=float android:pivotX=string android:pivotY=string > | <interpolator tag> <set> </set>

0 0

Post a comment