There are four major animations in Android, namely: Transform Animation (Tween Animation), frame animation (frames Animation), layout animation (layouts Animation), property animation (Properties Animation). Today, I'm simply going to change the animation here. First of all, let's say the properties of the animation species (these are all common properties in animations)
XML properties |
Java methods |
Explain |
Android:detachwallpaper |
Setdetachwallpaper (Booean) |
Whether to run on wallpaper |
Android:duration |
Setduration (Long) |
Duration of animation, in milliseconds |
Android:fillafter |
Setfillafter (Boolean) |
Whether the final state of the animation remains after the control finishes |
Android:fillbefore |
Setfillbefore (Boolean) |
Whether to revert to the state of the start animation after the control finishes |
Android:fillenabled |
Setfillenabled (Boolean) |
Same as Android:fillbefore effect |
Android:interpolator |
Setinterpolator (interpolator) |
Set the Interpolator (specified animation effects, such as rebound, etc.) |
Android:repeatcount |
Setrepeatcount (int) |
Number of repetitions |
Android:repeatmode |
Setrepeatmode (int) |
Repeat type has two values, reverse for reverse playback, restart for playback from the beginning |
Android:startoffset |
Setstartoffset (Long) |
The time, in milliseconds, to wait for a start run after the start function is called |
Android:zadjustment |
setzadjustment (int) |
Represents the position of the animated content at run time on the z axis (top/bottomrmal), which defaults to normal |
There are 4 kinds of transform animations: Transparency animation, zoom animation, rotation animation, displacement animation
Animated transform animations in Android (Tween Animation)