我已经使用填充动画实现了进度条,但我希望有一个像火车一样的动画效果,它会快速填充到一个特定的点,然后在接近终点时减慢速度。我的当前动画实现是:
ObjectAnimator animation = ObjectAnimator.ofInt(pbOption, "progress", percent);
animation.setDuration(1250);
animation.setInterpolator(new AccelerateInterpolator());
animation.start();
ObjectAnimator progressAnimator = ObjectAnimator.ofInt(pbOption, "progress", 10000, 0);
对象动画器progressAnimator
,将pbOption
对象的progress
属性从 10000 变化到 0。 - AskNilesh