Android动画笔记
Android中动画分为三类,分别是:
- Property Animation(属性动画)
- Drawable Animation(帧动画)
- View Animation(视图动画)
在这里重点记录Property Animation
Android 3.0以后引入了属性动画,属性动画可以轻而易举的实现许多View动画做不到的事,上面也看见了,View动画无非也就做那几种事情,别的也搞不定,而属性动画就可以的,譬如3D旋转一张图片。其实说白了,你记住一点就行,属性动画实现原理就是修改控件的属性值实现的动画。
看如下的代码:
/**
* This is the superclass for classes which provide basic support for animations which can be
* started, ended, and have <code>AnimatorListeners</code> added to them.
*/
public abstract class Animator implements Cloneable {
......
}
属性动画的相关类大都在android.animation包下面,其继承关系为:
- public abstract class Animator implements Cloneable
- public final class AnimatorSet extends Animator
- public class ValueAnimator extends Animator
- public final class ObjectAnimator extends ValueAnimator
- public class TimeAnimator extends ValueAnimator
以下是一些通常的用法
通过XML文档定义动画
参看博客:http://www.open-open.com/lib/view/open1335777066015.html
。。。。。。。
相关博客文章:http://blog.csdn.net/yanbober/article/details/46481171