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