我将三个ObjectAnimator
放入AnimatorSet
,当我取消AnimatorSet
或AnimatorSet
完成后,我需要记录getAnimatedValue
。但是,当我取消AnimatorSet
时,ObjectAnimator
可能没有运行,我可以在isRunning
中呼叫onAnimationCancel
,但我如何判断此ObjectAnimator
已经过了onAnimationEnd
animatorSet.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
mSunMovPos = (float) sunAnimator.getAnimatedValue();
mCurSunSetColor = (int) sunSetAnimator.getAnimatedValue();
//How do judge nightAnimator had runned ?
mCurNightColor = (int) nightAnimator.getAnimatedValue();
}
@Override
public void onAnimationCancel(Animator animation) {
mSunMovPos = (float) sunAnimator.getAnimatedValue();
mCurSunSetColor = (int) sunSetAnimator.getAnimatedValue();
if (nightAnimator.isRunning())
mCurNightColor = (int) nightAnimator.getAnimatedValue();
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
。
LocalNotification(
id,fireDate, alertTitle, alertBody, alertAction,
userInfo, launchImage, applicationIconBadgeNumber,
hasAction, repeatInterval, sound, smallIcon, autoCancel,
number, when, usesChronometer, vibrate, ticker, subText,
priority, actions, progress, bigText, bigPicture
);