讲解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。