Android ObjectAnimator在onLoadFinished中不工作

Android ObjectAnimator在onLoadFinished中不工作,android,android-animation,Android,Android Animation,我在片段中使用加载程序,加载完成后,我重新设置列表适配器的数据,并使用ObjectAnimator启动动画 我将ObjectAnimator编码为onLoadFinished(加载程序,XXX数据) 此动画代码在blank活动的onCreate中工作 如有任何建议和帮助,将不胜感激 我为此添加了完整的示例代码 如果我使用图书馆,这不会发生。 这不仅发生在onLoadFinished方法中,还发生在其他地方,如OnClickListner#onClick。空白活动的onCreate中的开始/结束

我在片段中使用加载程序,加载完成后,我重新设置列表适配器的数据,并使用ObjectAnimator启动动画

我将ObjectAnimator编码为onLoadFinished(加载程序,XXX数据)

此动画代码在blank活动的onCreate中工作

如有任何建议和帮助,将不胜感激

我为此添加了完整的示例代码

如果我使用图书馆,这不会发生。
这不仅发生在onLoadFinished方法中,还发生在其他地方,如OnClickListner#onClick。

空白活动的onCreate中的开始/结束/分数值是多少?看起来onLoadFinished上还有其他一些线程被调用了两次:@Whitney,谢谢你的评论。开始/结束与ObjectAnimator#OFIT的初始参数相同,分数在0.0f到1.0f之间变化。我发现,如果我重置了持续时间,这种情况就会发生。不仅在onLoadFinished中,而且在OnClickListener#onClick中。我添加了完整的代码,
        final ObjectAnimator anim = ObjectAnimator.ofInt(new AnimatedPointView(mTextView), "point", oldPoint, data.getPointBalance());
        anim.setEvaluator(new TypeEvaluator<Integer>() {
            @Override
            public Integer evaluate(float fraction, Integer startValue, Integer endValue) {
                if (BuildConfig.DEBUG) Ln.d("start="+startValue+", end="+endValue+", fraction="+fraction);
                return startValue + Math.round(fraction * (endValue - startValue));
            }
        });
        anim.setInterpolator(new LinearInterpolator());
        anim.setDuration(5000);
main start=113, end=103, fraction=1.0
main start=113, end=103, fraction=1.0