I have implemented the progress bar with fill animation, but I would like to have a animation effect like a train and which would fill fast to a particular point and then a bit slow brake in the speed till the end point. My current animation implementation is:
ObjectAnimator animation = ObjectAnimator.ofInt(pbOption, "progress", percent);
animation.setDuration(1250);
animation.setInterpolator(new AccelerateInterpolator());
animation.start();
Change AccelerateInterpolator() to DecelerateInterpolator(). Here the rate of change starts out quickly and and then decelerates.
ObjectAnimator animation = ObjectAnimator.ofInt(pbOption, "progress", percent);
animation.setDuration(1250);
animation.setInterpolator(new DecelerateInterpolator());
animation.start();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With