Animation mechanism in ftk

Source: Internet
Author: User

 

Indicate the source and author's contact information during reprinting.
ArticleSource: http://www.limodev.cn/blog

Author contact: Li xianjing <xianjimli@gmail.com>

 

Although ftk supports window animation for a long time, as an animation implementer, I have to admit that the animation implementation before ftk version 0.6 is very poor. The main reasons are as follows:

1. The animation speed is a single uniform motion.
2. The number of animation frames cannot change with the hardware performance.
3. The animation only includes the entry (Display) animation of the window, but does not have the exit (close) animation of the window.
4. The animation mechanism is not integrated into the GUI and must be created and called by the user, which is troublesome to use.

Some time ago, it took a lot of time to study the implementation of Android GUI because of work. I paid special attention to its animation implementation, and I was inspired by it. Recently, we have re-implemented the ftk animation mechanism, which draws on the android animation principle to a large extent. Of course, there are great differences in implementation. Here is a brief introduction to the implementation of ftk window Animation:

Relationship between the animation running time and the animation running Progress

If the animation moves at a constant speed, the time and position are linearly related. For example, if the time is over 50%, the animation runs to the position of 50%. However, the motion of the implemented object may be accelerated or reduced.
Speed movement or ball rebound, if all the window animation uses a uniform motion, it is difficult to achieve the ideal animation effect. To solve this problem, we introduce an interpolation device (interpolator)
To realize the transformation between time and position.

Please read the PDF document.


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.