Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions radialprogressbar/src/main/java/com/mindorks/RadialProgressBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -762,4 +762,11 @@ open class RadialProgressBar : View {
invalidate()
}

/**
clear all the progress rings
*/
fun clearAllProgress() {
setProgressValues(0,0,0)
}

}