Tween Animation is one kind of animation that we only need to set the start and the end. It will supply the lack between the start and the end. It is why we called tween here.
We have four kinds tween animation: Alpha, Rotate, Translate, Scale.
Tween animation could be set in both code and xml.
By AnimationSet, we could mix these animations together.
By AnimationUtils.loadAnimation, we could load these animations defined in xml.
By Animation.AnimationListener, we could add listner to listen to changes of animations.
AlphaAnimation
Tween animation could also be set in xml. It needs to create firstly a xml file in /res/anim folder: animation_alpha.xml.
Then in the code, we could load one animation its file id.
RotateAnimation
By xml:
TranslateAnimation
By xml:
ScaleAnimation
By xml:
How to mix these animations
By adding every animation in AnimationSet. We could mix animations together.
By xml:
Set Listener
We could listner to start/repeat/end of an animation