diff --git a/radialprogressbar/src/main/java/com/mindorks/RadialProgressBar.kt b/radialprogressbar/src/main/java/com/mindorks/RadialProgressBar.kt index 7b9f0b4..0f70625 100644 --- a/radialprogressbar/src/main/java/com/mindorks/RadialProgressBar.kt +++ b/radialprogressbar/src/main/java/com/mindorks/RadialProgressBar.kt @@ -560,7 +560,7 @@ open class RadialProgressBar : View { Set the Progress of Outer Progress View */ fun setOuterProgress(progress: Int) { - if (progress != 0) mOuterProgress = progress + mOuterProgress = progress val animator = ValueAnimator.ofFloat(mSweepAngleOuterView.toFloat(), calcSweepAngleFromOuterProgress(mOuterProgress)) animator.removeAllUpdateListeners() @@ -666,7 +666,7 @@ open class RadialProgressBar : View { */ fun setInnerProgress(progress: Int) { if (!(hasOneProgressView && hasTwoProgressView)) { - if (progress != 0) mInnerProgress = progress + mInnerProgress = progress val animator = ValueAnimator.ofFloat(mSweepAngleInnerView.toFloat(), calcSweepAngleFromInnerProgress(mInnerProgress)) animator.removeAllUpdateListeners() @@ -697,7 +697,7 @@ open class RadialProgressBar : View { */ fun setCenterProgress(progress: Int) { if (!(hasOneProgressView && !hasTwoProgressView)) { - if (progress != 0) mCenterProgress = progress + mCenterProgress = progress val animator = ValueAnimator.ofFloat( mSweepAngleCenterView.toFloat(), @@ -762,4 +762,11 @@ open class RadialProgressBar : View { invalidate() } + /** + clear all the progress rings + */ + fun clearAllProgress() { + setProgressValues(0,0,0) + } + } \ No newline at end of file