首页 > 代码库 > 个人对属性动画的方法的理解

个人对属性动画的方法的理解

objectAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
objectAnimator.setRepeatCount(Integer.MAX_VALUE);
objectAnimator.addListener(new Animator.AnimatorListener()
{

@Override
public void onAnimationStart(Animator animation)
{
//动画开始
}

@Override
public void onAnimationEnd(Animator animation)
{
//动画结束
}

@Override
public void onAnimationCancel(Animator animation)
{
//动画取消
}

@Override
public void onAnimationRepeat(Animator animation)
{
//动画重复
}
});
objectAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
{

@Override
public void onAnimationUpdate(ValueAnimator animation)
{

int values = (int) animation.getAnimatedValue();
}
});
objectAnimator.start();

 

objectAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
objectAnimator.setRepeatCount(Integer.MAX_VALUE);
objectAnimator.addListener(new Animator.AnimatorListener()
{

@Override
public void onAnimationStart(Animator animation)
{
//动画开始
}

@Override
public void onAnimationEnd(Animator animation)
{
//动画结束
}

@Override
public void onAnimationCancel(Animator animation)
{
//动画取消
}

@Override
public void onAnimationRepeat(Animator animation)
{
//动画重复
}
});
objectAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener()
{

@Override
public void onAnimationUpdate(ValueAnimator animation)
{

int values = (int) animation.getAnimatedValue();
}
});
objectAnimator.start();

 

个人对属性动画的方法的理解