Animation effects of Animation

Source: Internet
Author: User

 

AlphaAnimation controls gradient and transparent animation Effects

ScaleAnimation: controls the animation effect of size scaling

TranslateAnimation controls the animation effect of screen translation

RotateAnimation

I will introduce the effects of these four types of animations in code. You can run the code in your own program and debug and watch the effects of various animations.

First, initialize four animation effects in Oncreate ().

 

Then, you can set a button to control the running of the animation, and add some widgets in the GridView layout. (To demonstrate the effect) When you click the Button, enter the following code:

 

Here

Interpolator defines the rate of change of an animation ). This allows the basic animation effects (alpha, scale, translate, and rotate) to accelerate, slow down, and repeat. (For more information, see the document) the class "AnimationSet" is the collection class of "animation.

 

 

 

 

 

This article is from the "HDDevTeam" blog

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.