A small analysis of Android animation

Source: Internet
Author: User

The animations described here are animations within the animation framework provided by the Android framework.

is a view-level animation. Does not involve the underlying OpenGL ES related animation implementations.

Animation:

Mainly include

Interpolation

Duration

Frameduration

RepeatCount

Repeatmode

Animation content

This 6 basic element. The last one is I add, is the animation content, is to do what type of animation.

Note: An animation is a behavior pattern that must be separated from the object that implements the animation behavior.

The Android Upper animation Framework provides:

Frame animation:

This is like putting a movie in a frame and putting a picture in one frame.

Treen Animation:

Translation, Scale,alpha,rotate,

Property animation

Animate by changing the object property

Flexibility:

Frame Animation < Treen animation <property animation

I really like property animation

Because he's very flexible.

Content animations like frame animation and Treen animation for the entire view object

Property animation can apply animations to a portion of the content within a view.

The animation described above is an animated effect that is implemented on the basis of the view's drawing.

Measure->layout->draw

Of course, when animating, only cause one of the process changes in the above drawing process, is the best, will make the animation very smooth.

Android also offers Animationset

Multiple animations can be combined to execute together. And you can set the animation execution order, and delay time and so on.

Of course, Animationset also has limitations, such as the animation of the entire animation collection can not be animated cycle.

There are some special usages of the view that can produce animation effects:

For example, ImageView's Imagematrix a matrix change to the matrix.

There are also layoutanimation:

For ViewGroup, performs an animation on the child view for the first layout.

Time is limited to a temporary analysis here. There is time to improve in the future.

A small analysis of Android animation

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.