diff --git a/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java b/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java index c922aa6..e7e3f7f 100644 --- a/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java +++ b/src/main/java/com/budiyev/android/circularprogressbar/CircularProgressBar.java @@ -433,9 +433,15 @@ protected void onDraw(final Canvas canvas) { if (sweep > 0) { start += capAngle; sweep -= capAngle * 2f; + if (sweep < 0.0001f) { + sweep = 0.0001f; + } } else if (sweep < 0) { start -= capAngle; sweep += capAngle * 2f; + if (sweep > -0.0001f) { + sweep = -0.0001f; + } } } canvas.drawArc(mDrawRect, start, sweep, false, mForegroundStrokePaint);