framework 之 Animation (三)

2014-11-24 11:24:38 · 作者: · 浏览: 22
n of the animation.


*/
public static interface AnimationListener {
/**
*

Notifies the start of the animation.


*
* @param animation The started animation.
*/
void onAnimationStart(Animation animation);

/**
*

Notifies the end of the animation. This callback is not invoked
* for animations with repeat count set to INFINITE.


*
* @param animation The animation which reached its end.
*/
void onAnimationEnd(Animation animation);

/**
*

Notifies the repetition of the animation.


*
* @param animation The animation which was repeated.
*/
void onAnimationRepeat(Animation animation);
}
四、总结:


Animation类的讲解,只是一个抛砖引玉,让大家在继承或使用其子类时,能够更好的去理解其原理,正如本文开头所说,在Android OS4.0之后,又出现了一个新的叫Animator类,之所以新添加了一个动画框架,其原因:

1. Animation能力有限,即便是将4种效果组合来用,也无法达到某些高级特效的效果;

2. Animation需要对整个view进行动画,这也导致其性能较低;

而Animator弥补了这些,因此争取有空时,将Animator也讲解一下