diff --git a/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java b/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java index 3dc8ff0..77c5cb4 100644 --- a/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java +++ b/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java @@ -333,10 +333,10 @@ protected void onDraw(Canvas canvas) { float maximum = mMaximum; float progress = mProgress; start = mStartAngle; - if (Math.abs(progress) >= Math.abs(maximum)) { - sweep = 360f; - } else { + if (Math.abs(progress) < Math.abs(maximum)) { sweep = progress / maximum * 360f; + } else { + sweep = 360f; } } canvas.drawArc(mDrawRect, start, sweep, false, mForegroundStrokePaint);