android 属性动画结束监听
如果用的是AnimatorSet,那么只要其中一个没有结束都不会调用onAnimationEnd方法
自定义差值器如果return 0;那么表示不会改变
重复动画OOM,动画重复可以设置如下设置
alphaAnimtor.setRepeatCount(ValueAnimator.INFINITE);
alphaAnimtor.setRepeatMode(ValueAnimator.REVERSE);
若是在监听中做一些设置会OOM,如下
@Override
public void onAnimationEnd(Animator animation) {
cancel();
initAnimation();
start();
}
//java.lang.OutOfMemoryError: Failed to allocate a 32240760 byte allocation with 16777120 free bytes and 24MB until OOM
虽然不知道为什么会这样
- addListener addUpdateListener
update先调用,再调用start 最后调用end
最后欢迎关注我的微信公众号:云端看大地