Android Animation Animation Properties

Source: Internet
Author: User

In Android, the implementation of the Animation animation effect can be implemented in two ways:

One is the tweened animation gradient animation, the other is the frame by frame animation tween (picture conversion) animation.

tweened Animation has the following two types of gradient animations:

1.alpha Gradient Transparency Animation effect

2.scale Gradient size Stretch animation effect

Frame by Frame animation screen conversion animations are available in the following two categories:

1.translate picture Conversion position Move animation effect

2.rotate Picture Transfer rotation animation effect

Common properties are listed below:

<?XML version= "1.0" encoding= "Utf-8"?><Setxmlns:android= "Http://schemas.android.com/apk/res/android"Android:shareinterpolator= "false" >    <!--Gradient Transparency Animation effect -    <Alphaandroid:duration= "300"//Set the duration of the animation 300 millisecondsAndroid:fromalpha= "0.1"//Set transparency at start of Animation 1.0 for opaque, 0.0 for full transparencyAndroid:toalpha= "1.0" />//Set transparency at start of animation 0.0 for full transparency    <!--Picture Transfer rotation animation effect -    <Rotateandroid:duration= "300"//Set the duration of the animation 300 millisecondsandroid:fromdegrees= "0"//sets the angle at which the animation startsAndroid:pivotx= "50%"//sets the position of the animation relative to the x-coordinate of the controlAndroid:pivoty= "50%"//sets the position of the animation relative to the control's y-coordinateandroid:todegrees= " the" />//sets the angle of rotation at the end of the animation    <!--move animation effect on picture transition position -    <Translateandroid:duration= "300"//Set the duration of the animation 300 millisecondsAndroid:fromxdelta= "0"//sets the position of the x-coordinate at the start of the animationAndroid:fromydelta= "0"//sets the position of the y-coordinate at the start of the animationAndroid:toxdelta= "50"//sets the x-coordinate position at the end of the animationAndroid:toydelta= " the" />//sets the position of the y-coordinate at the end of the animation    <!--Gradient Dimension stretch animation effect -    < Scaleandroid:duration= "300"//Set the duration of the animation 300 millisecondsAndroid:fromxscale= "3.0"//Set stretch length on x-coordinate at start of animationAndroid:fromyscale= "3.0"//Set the stretch length on the y-coordinate at the start of the animationAndroid:pivotx= "50%"//sets the position of the animation relative to the x-coordinate of the controlAndroid:pivoty= "50%"//sets the position of the animation relative to the control's y-coordinateAndroid:toxscale= "1.0"//Set stretch length at end of animation at x coordinateAndroid:toyscale= "1.0" />//sets the stretch length on the y-coordinate at the end of the animation</Set>

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.