The implementation of Android's satellite menu

Source: Internet
Author: User

Satellite menu is now a very popular "control", many Android programmers are flocking to preview as. The traditional satellite menu is implemented with animation, requires a lot of code, and the algorithm is very much, accidentally will be overnight debug. This post uses the property animation animator to implement the satellite menu.

An analysis of the property animation animator

Animator is a new feature released by Android3.0, with simple code and rich results. Property animation, as the name implies, as long as the properties can be get and set, we can use the Property animation processing. Properties and methods commonly used in property animations are as follows:

Valueanimator//A number generator that allows for many very flexible animation effectsObjectanimator//Valueanimator sub-class, the valueanimator is encapsulated, so that we can more easily use the property animation, we have to manipulate an object through Objectanimator, animation effectAnimatorlistener//Event listener for animation start, end, pause, repeat, etc. (requires rewriting four methods)Animatorlisteneradapter//an event listener for an action in the start, end, pause, or repeat of an animation (you only need to override one method depending on the action you choose)Animatorset//A collection of animations used to set the relationship between multiple animations (before, after, and so on)Propertyvaluesholder//A collection of animations, similar to AnimatorsetTypeevaluators//value Calculator, which introduces a custom Property object when using the Valueanimator.ofobject () methodInterpolators//interpolator, animating effects (speed gradient, bounce, etc.)

The development of the satellite menu is mainly used in the objectanimator. The properties commonly used in Objectanimator are as follows:

Translationx/translationy             Level//RotationY Horizontal/                    /ScaleY                         level//Y                                   direct reach x/  Y-coordinate alpha                                   transparency

Second, the realization of the satellite menu

To be Continued ...

The implementation of Android's satellite menu

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.