3.4 经过AnimationSet应用多个动画函数
AnimationSet提供了一个把多个动画组合成一个组合的机制,并可设置组中动画的时序关系,如同时播放,顺序播放等。动画
如下例子同时应用5个动画:spa
播放anim1;同时播放anim2,anim3,anim4;播放anim5。.net
AnimatorSet bouncer = new AnimatorSet();blog
bouncer.play(anim1).before(anim2);继承
bouncer.play(anim2).with(anim3);接口
bouncer.play(anim2).with(anim4)ip
bouncer.play(anim5).after(amin2);ci
animatorSet.start();input
---------------------------------------------------------------------------------------------
3.6 TimeInterplator
time interplator定义了属性值变化的方式,如线性均匀改变,开始慢而后逐渐快等。在Property Animation中是TimeInterplator,在View Animation中是Interplator,这两个是同样的,在3.0以前只有Interplator,3.0以后实现代码转移至了 TimeInterplator。Interplator继承自TimeInterplator,内部没有任何其余代码。
AccelerateInterpolator 加速,开始时慢中间加速
DecelerateInterpolator 减速,开始时快而后减速
AccelerateDecelerateInterolator 先加速后减速,开始结束时慢,中间加速
AnticipateInterpolator 反向 ,先向相反方向改变一段再加速播放
AnticipateOvershootInterpolator 反向加超越,先向相反方向改变,再加速播放,会超出目的值而后缓慢移动至目的值
BounceInterpolator 跳跃,快到目的值时值会跳跃,如目的值100,后面的值可能依次为85,77,70,80,90,100
CycleIinterpolator 循环,动画循环必定次数,值的改变为一正弦函数:Math.sin(2 * mCycles * Math.PI * input)
LinearInterpolator 线性,线性均匀改变
OvershottInterpolator 超越,最后超出目的值而后缓慢改变到目的值
TimeInterpolator 一个接口,容许你自定义interpolator,以上几个都是实现了这个接口
摘自:http://blog.csdn.net/yuzhiboyi/article/details/7731826