Set play time after calling start() rather than before
Fixes
@@ -313,10 +313,11 @@ public class LottieDrawable extends Drawable implements Drawable.Callback {
reverseAnimationWhenCompositionAdded = false;
return;
}
+ long playTime = setStartTime ? (long) (progress * animator.getDuration()) : 0;
+ animator.start();
if (setStartTime) {
- animator.setCurrentPlayTime((long) (progress * animator.getDuration()));
+ animator.setCurrentPlayTime(playTime);
}
- animator.start();
}
@SuppressWarnings({"unused", "WeakerAccess"}) public void resumeReverseAnimation() {
