diff --git a/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java b/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java index 43bda22..ef0d570 100644 --- a/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java +++ b/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java @@ -739,14 +739,14 @@ private static Paint.Cap getStrokeCap(final int value) { private final class ProgressUpdateListener implements ValueAnimator.AnimatorUpdateListener { @Override public void onAnimationUpdate(final ValueAnimator animation) { - setProgressInternal((Float) animation.getAnimatedValue()); + setProgressInternal(((Number) animation.getAnimatedValue()).floatValue()); } } private final class StartUpdateListener implements ValueAnimator.AnimatorUpdateListener { @Override public void onAnimationUpdate(final ValueAnimator animation) { - mIndeterminateStartAngle = (Float) animation.getAnimatedValue(); + mIndeterminateStartAngle = ((Number) animation.getAnimatedValue()).floatValue(); invalidate(); } } @@ -754,7 +754,7 @@ public void onAnimationUpdate(final ValueAnimator animation) { private final class SweepUpdateListener implements ValueAnimator.AnimatorUpdateListener { @Override public void onAnimationUpdate(final ValueAnimator animation) { - mIndeterminateSweepAngle = (Float) animation.getAnimatedValue(); + mIndeterminateSweepAngle = ((Number) animation.getAnimatedValue()).floatValue(); } }