Android tween animation

Source: Internet
Author: User

Alphaanimation controls gradient and transparent animation Effects

1. Android: transparency at the beginning of fromalpha Animation

2. Android: transparency at the end of the toalpha Animation

Scaleanimation: controls the animation effect of size scaling

1. Android: Scaling size of X coordinates at the start of fromxscale Animation

2. Android: Scaling size of X coordinates at the end of the toxscale Animation

3. Android: Scaling size of Y coordinate at the start of fromyscale Animation

4. Android: Scaling size of Y coordinates at the end of the toyscale Animation

Note: The setting value of the above four attributes is float 0.0, indicating that the data has been reduced to none. The value of 1.0 indicates that the data size is the default value. If the value is greater than 1.0, the data has been zoomed in. If the value is smaller than 1.0, the data has been reduced.

5. Android: the starting position of the X coordinate at the start of the animated TX Animation

6. Android: Start position of the Y coordinate at the start of the policty Animation

Note: The above two values are set to 0% ~ 100%.

Translateanimation controls the animation effect of screen translation

1. Android: Position of the X coordinate at the start of the fromxdelta Animation

2. Android: Position of the X coordinate at the end of the toxdelta Animation

3. Android: Position of the X coordinate at the start of fromydelta Animation

4. Android: Position of the X coordinate at the start of the toydelta Animation

Note: You can set three values for the preceding four attributes. 1. common pixel value 2. number + % relative to the width or height of the element itself (X is the width, Y is the height) 3. the width or height of the number + % P relative to the element itself (X is the width, Y is the height)

Rotateanimation

1. Android: the angle of the element at the start of the fromdegrees Animation

2. Android: the angle of the element at the end of the todegrees Animation

Note: When the angle is negative, it indicates clockwise rotation. When the angle is positive, it indicates clockwise rotation.

3. Android: the starting position of TX relative to the X coordinate of the element

4. Android: Start position of the policty relative to the Y coordinate of the element

Note: You can set three types of values for the preceding two attributes-1. float: The pixel value relative to the left or top edge of the object (for example, 5) 2. number + %: the percentage (for example, 5%) relative to the left or upper edge of the element. 3. number + % P: Percentage of the Left or upper edge of the parent container (for example, 5%)

Some common attributes:

Android: Duration animation duration, in milliseconds

Android: When fillafter is set to true, the animation deformation will be applied when the animation ends.

Android: When fillbefore is set to true, the animation deformation will be applied when the animation starts.

Android: repeatcount animation repetition times

Android: repeatmode defines repeated animation behavior. Restart: Start reverse again: reverse

The following is an example for your understanding.

Effect:

: Http://download.csdn.net/detail/wenwei19861106/4857941

 

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.