How to establish a delay at ObjectAnimator



  • There's this animation:

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

    When writing animation in .xml - there's a parameter like that. offsetwhich I understand could delay animation. I'm interested in how you can make such a delay using it. ObjectAnimator



  • Try this:

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



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2