带有线性插值器的Android动画断断续续

问题描述

我正在为带有线性插值器的Android进度栏设置动画。尽管有一点帮助,但我的动画看起来仍然很不稳定。

相关动画的时长为30秒。可能因为它更长一点而不可避免地会变得断断续续吗?毫不奇怪,如果我使用较短的持续时间,动画看起来会更平滑,但是为此,我需要动画持续30秒。

这是我的代码

ProgressBar mTrickTimer;
mTrickTimer = findViewById(R.id.trickTimer);
mAnimation = ObjectAnimator.ofInt(mTrickTimer,"progress",100,0);
mAnimation.setInterpolator(new LinearInterpolator());
// Get duration scale from the global settings.
float animscale = Settings.Global.getFloat(getContentResolver(),Settings.Global.ANIMATOR_DURATION_SCALE,1.0f);
mAnimation.setDuration((long)(30000 / animscale)); // in milliseconds
mAnimation.start();

这是我的动画外观:

enter image description here

对此我有什么办法可以解决吗,或者由于动画的长度我没有选择余地吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)