Android contains three kinds of animations: View Animation, drawable Animation, property Animation (newly introduced with Android 3.0).
1, View Animation: That is to say the tweened Animation (tween animation). View animation is divided into four categories: Alphaanimation, Rotateanimation, Scaleanimation, translateanimation, respectively, corresponding to the transparency, rotation, size, displacement four kinds of changes.
It is a view-based gradient animation that only changes the view's drawing effect, while the actual property value remains unchanged. For example, the animation moves a button position, but the actual position of the button click remains unchanged. Defining animations in code can refer to subclasses of the Animationset class and animation, and XML files can be defined in the res/anim/folder if XML is used.
There are two drawbacks: (1) View animation generally can only modify some of the properties of the component (view Object), such as scaling and rotation, but cannot modify the background color of the component. (2) View animation The animation effect of a component to move a distance, such as moving from the left side of the screen to the right, in fact, the entire process is drawn out of the effect, the component's true position remains on the left side, only click on the left position to trigger the component. So to really move a component, you need to add code implementations after the animation ends.
2, drawable Animation: Also that is Frame-by-frame Animation (frame-wise animation). Load a series of drawable resources to create animations, a traditional animation that, in part, creates different sequences of images, which are played sequentially, just like film footage. Define animation frames in code, use the Animationdrawable class; XML files make it easier to compose animation frames in the Res/drawable folder.
3, Property Animation: Along a certain time order, by changing the view properties, so as to get animation effect. Make the "Seeing is real", after the animation, the property values of object objects are actually changed. Property animation can realize the view animation by changing the actual properties of the View object, and the view can automatically call invalidate () to refresh any time the View property is changed.
Classification of android--animations