There is such an animation:

ObjectAnimator progress = new ObjectAnimator().ofFloat(progressBar,"progress",0,mTotalCount); progress.setInterpolator(new DecelerateInterpolator(0.7f)); 

When writing an animation in .xml - there is such a parameter as offset , which I understand as I could make the animation delay. I'm interested in how you can make a similar delay using ObjectAnimator

  • offset is not a delay, but an "offset" - from which position the animation will be started - Vladyslav Matviienko
  • just indicated the value in milliseconds, and I thought that the delay, in general, how can this effect be achieved? - Kirill Stoianov

1 answer 1

Try this:

 ObjectAnimator progress = new ObjectAnimator().ofFloat(progressBar,"progress",0,mTotalCount); progress.setStartDelay(1000); progress.setInterpolator(new DecelerateInterpolator(0.7f)); 
  • one
    yes, what you need! - Kirill Stoianov