Four basic animations of Android siege Lion

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.