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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent e587c02 commit db2ae64
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -162,35 +162,41 @@ public void setAnimateProgress(boolean animate) {
}

public void setIndeterminateMinimumAngle(float angle) {
if (mIndeterminate) {
boolean animating =
mIndeterminate && (mIndeterminateStartAnimator.isRunning() || mIndeterminateSweepAnimator.isRunning());
if (animating) {
stopIndeterminateAnimations();
}
mIndeterminateMinimumAngle = angle;
mIndeterminateSweepAnimator.setFloatValues(360f - angle * 2f);
invalidate();
if (mIndeterminate) {
if (animating) {
startIndeterminateAnimations();
}
}

public void setIndeterminateRotationAnimationDuration(@IntRange(from = 0) long duration) {
if (mIndeterminate) {
boolean animating =
mIndeterminate && (mIndeterminateStartAnimator.isRunning() || mIndeterminateSweepAnimator.isRunning());
if (animating) {
stopIndeterminateAnimations();
}
mIndeterminateStartAnimator.setDuration(duration);
invalidate();
if (mIndeterminate) {
if (animating) {
startIndeterminateAnimations();
}
}

public void setIndeterminateSweepAnimationDuration(@IntRange(from = 0) long duration) {
if (mIndeterminate) {
boolean animating =
mIndeterminate && (mIndeterminateStartAnimator.isRunning() || mIndeterminateSweepAnimator.isRunning());
if (animating) {
stopIndeterminateAnimations();
}
mIndeterminateSweepAnimator.setDuration(duration);
invalidate();
if (mIndeterminate) {
if (animating) {
startIndeterminateAnimations();
}
}

0 comments on commit db2ae64

Please sign in to comment.