Android Animation Technology

Source: Internet
Author: User

There are three main types of Android animations: Motion tweens, frame-by-frames animations and property animations (introduced later in android3.0) Learn more about the basics of animation, and read more about the blog http://www.cnblogs.com/angeldevil/ Archive/2011/12/02/2271096.html . The main article on Android animation in the project development problems and solutions are listed as follows:

1, the attribute animation is introduced after android3.0. According to the project experience in the work, the property animation efficiency appears to be higher than the motion tween and frame-wise animation . Property animations are recommended for devices above android3.0, and property animations can be used to animate motion tweens and frame animations. The animation does not start when the view property that needs to show the animation is set to the gone state.

2, about the frame animation start can not start in the OnCreate, in the OnCreate startup there is a possibility that the view control does not appear loaded so that the animation effect does not work, generally in the Onwindowfocuschanged method to start the animation.

3, about deleting the view that contains the animation in ViewGroup, because the view animation has not been completed even though the view has been deleted but still remains on the screen, you can call the method in ViewGroup Cleardisappearingchildren Avoid the occurrence of the above situation. It is also recommended to call the Refresh method after calling the method in the low version of Android.

4. For horizontal scrolling, the ListView can be implemented using the latest Android Recylerveiw.


Frame animation :

Collect static pictures, control the display, and visually stop.

animationdrawable Brush Web pages, dynamic loading, circles, etc.


Tween (Tween) animations:

Just specify the keyframe at the end of the start , and the middle frame is calculated by the system.

Interpolator transparency changes, size scaling, displacement changes, rotation animation, and so on.


Property animations:

Enhanced tween animations that define any property changes (not only transparency, size, displacement, rotation), and animate any object (whether or not it is on the screen).

Many APIs

Animator: Create property Animation base class, be inherited rewrite;

Valueanimator: The main time engine that calculates the frame's attribute value, the core function.

The small ball drops the animation, listens to the user on the screen the touch screen time ...


Surfaceview Implementation animations:

View has a flaw in drawing:

1.View lacks a dual-cache mechanism,

2. When the program updates the view image, the program must redraw the entire picture displayed on the view,

3. New thread cannot update view component directly


So customize the view drawing, in-game drawing. Android offers Surfaceview to replace view, which is even better in the game.



Android Animation Technology

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.