講解anroid.view.animation。
Animation
animation
package description file
.public abstract class Animation implements Cloneable {...}
該類是一個抽象類,實現Cloneable,可以clone克隆。它的子類包括AlphaAnimation, AnimationSet, RotateAnimation, ScaleAnimation, TranslateAnimation。
- Parameters:
shareInterpolator
Pass true if all of the animations in this set should use the interpolator associated with this AnimationSet. Pass false if each animation should use its own interpolator.
<span style="font-size:12px;">public interface Interpolator extends TimeInterpolator{...}</span>
Transformation
在繪製Tween動畫的時候用的,Tween動畫的實質就是ParentView不斷的調整childView的Canvas的座標來實現的,在dispathdraw()中,Animation a = ChildView.getAnimation();Transformation tm = a.getTransformation(); //Transformation 中包含一個矩陣和 alpha 值,矩陣是用來做平移、旋轉和縮放動畫的,通過tm來設置子控件的canvas。