android 属性动画监听

来源:互联网 发布:华东理工大学网络教育 编辑:程序博客网 时间:2024/06/14 12:45

android 属性动画结束监听

  1. 如果用的是AnimatorSet,那么只要其中一个没有结束都不会调用onAnimationEnd方法

  2. 自定义差值器如果return 0;那么表示不会改变

  3. 重复动画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

虽然不知道为什么会这样

  1. addListener addUpdateListener
    update先调用,再调用start 最后调用end
1 0
原创粉丝点击