Android Basic animation 1. Tween Animation Transform animation 2. Frame Animation Frames Animation 3. Layout Animation Animation 4. Property Animation Properties Animation tween Animation (Transform animation) is also divided into four types in Android: Alpha: Gradient Transparency Animation scale: Gradient dimension zoom Animation translate: Position move animation rotate: Rotate animation tween Animation Common properties: 1. Duration: Animation duration (in milliseconds) 2. Fillafter: Set to True, animation conversion is applied after the end of the animation 3. Fillbefore: Set to True, the animation conversion is applied 4 before the animation starts. Interpolator: Animation Insert (acceleration, deceleration insert) 5. RepeatCount: Animation repeat number 6. Repatemode: Sequential repeat/Reverse 7. Startoffset: The time interval between animations animation implemented in two ways: 1. Configuration file (/res/anim)--alpha, scale, translate, rotate. More simple. 2. Java code Implementation--alphaanimation, Scaleanimation, Trananimation, Rotateanimation. More flexible. Two ways: If the transformation is more, and many of the parameters are dynamic (such as time interval, displacement movement coordinates through dynamic acquisition, dynamic calculation), it is recommended to use Java code implementation. If the animation is a fixed effect, the way the configuration file is used is recommended. Animations are implemented by loading the configuration file: Animation scale = animationutils.loadanimation (Tweenactivity.this,r.anim.scale_anim);// Start animation img.startanimation (scale);
Android Siege Lion Basic animation