Android属性动画之 一、 ValueAnimator

ValueAnuimator

      属性动画(Property Animator)是一种针对于值变化的变值器。

      主要方法有ofInt(int...)、ofFloat(Float...), offColor(Color...)

     setDuration()、一次动画持续时间

     getAnimatedValue()、当前的值有Integer、Float、Color、

     start().开始动画

     setRepeatMode()、动画重复模式。ValueAnimation.RESTART(重新开始)和 ValueAnimation.REVERSE(倒序重新开始).

    setRepeatCount()、动画循环次数。0表示不循环,ValueAnimation.INFINITE为无线循环.

    cancel()。取消动画

    setStartDelay(long startDelay)  动画延迟开始时间
    ValueAnimator clone()  克隆,可参考深度拷贝和浅拷贝

    两个监听器

    AnimatiorUpdateListener(onAnimationUpdate(Animator) )

   AnimatiorListener(onAnimationStart(Animatior)、onAnimationEnd(Animatior)、onAnimationCancel(Animatior)、onAnimationRepeat(Animator) )

  addUpdateListener()

  addListener()

  removeUpdateListener(AnimatorUpdateListener listener)

  void removeAllUpdateListeners();

  void removeListener(AnimatorListener listener); 

  void removeAllListeners();

猜你喜欢

转载自blog.csdn.net/u011750755/article/details/78651960