alphaanimation (transparent animation) 1.xml file <set xmlns:android= "http://schemas.android.com/apk/res/android" > <!--gradient animation, expressed from transparency 10% to 100%, Duration is 1 seconds--><alpha android:fromalpha= "0.1" android:toalpha= "1" android:duration= " ></alpha></set>2. Code animation animation;//Animated Object Animation=animationutils.loadanimation (this, R.anim.alpha); Load the animation in mimageview.startanimation (animation);//imageview start animation, parameter for set animation
scaleanimation (scale animation) XML file <set xmlns:android= "/http/ Schemas.android.com/apk/res/android "> <!--interpolator//plug-in, such as this setting is accelerated first, then slowed down. Android:pivotx= "0.1" sets the coordinates of the anchor point X. Represents the start of the coordinate amplification--<scale android:duration= "1" android:fromxscale= "android:fromyscale= "0.1" android:interpolator= "@android: Anim/accelerate_decelerate_interpolator" android:pivotx= "0.1" an Droid:pivoty= "50%" android:toxscale= "1.0" android:toyscale= "1.0" > </scale></set>
br>
translateanimation (displacement animation) <set xmlns:android= "/http/ Schemas.android.com/apk/res/android "> <!--android:fromxdelta=" 0 "//indicates where to start from X, if 0, is the current position Android:toxde Lta= "100"//indicates to x where to end Delta "math" (variable) increments--<translate android:fromxdelta= "0" Android:tox Delta= "" android:fromydelta= "0" android:toydelta= "android:duration=" "></tra" Nslate></set>
rotateanimation (rotate animation)<set xmlns:android= "http://schemas.android.com/apk/res/android" > <!- - android:fromdegrees= "0" means rotation from 0 degrees android:todegrees= "720" means "counterclockwise" rotation of two laps (720 degrees), if "+720", then clockwise rotation 720 degrees -- <rotate android:fromdegrees= "0" android:todegrees= " -720" android:pivotx= "0" android:pivoty= "0" android:interpolator= "@android: Anim/accelerate_decelerate_interpolator" android: duration= " > </rotate></set>"
Four basic animations of Android siege Lion