Skip to content

Commit

Permalink
Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-budiyev committed Dec 16, 2017
1 parent db2ae64 commit 0f96b9c
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ public void setAnimateProgress(boolean animate) {
}

public void setIndeterminateMinimumAngle(float angle) {
boolean animating =
mIndeterminate && (mIndeterminateStartAnimator.isRunning() || mIndeterminateSweepAnimator.isRunning());
boolean animating = isIndeterminateAnimating();
if (animating) {
stopIndeterminateAnimations();
}
Expand All @@ -176,8 +175,7 @@ public void setIndeterminateMinimumAngle(float angle) {
}

public void setIndeterminateRotationAnimationDuration(@IntRange(from = 0) long duration) {
boolean animating =
mIndeterminate && (mIndeterminateStartAnimator.isRunning() || mIndeterminateSweepAnimator.isRunning());
boolean animating = isIndeterminateAnimating();
if (animating) {
stopIndeterminateAnimations();
}
Expand All @@ -189,8 +187,7 @@ public void setIndeterminateRotationAnimationDuration(@IntRange(from = 0) long d
}

public void setIndeterminateSweepAnimationDuration(@IntRange(from = 0) long duration) {
boolean animating =
mIndeterminate && (mIndeterminateStartAnimator.isRunning() || mIndeterminateSweepAnimator.isRunning());
boolean animating = isIndeterminateAnimating();
if (animating) {
stopIndeterminateAnimations();
}
Expand Down Expand Up @@ -454,6 +451,10 @@ private void startIndeterminateAnimations() {
}
}

private boolean isIndeterminateAnimating() {
return mIndeterminate && (mIndeterminateStartAnimator.isRunning() || mIndeterminateSweepAnimator.isRunning());
}

private final class ProgressUpdateListener implements ValueAnimator.AnimatorUpdateListener {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
Expand Down

0 comments on commit 0f96b9c

Please sign in to comment.