File tree Expand file tree Collapse file tree
multiprogressbar/src/main/java/com/genius/multiprogressbar Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 android : roundIcon =" @mipmap/ic_launcher_round"
1010 android : supportsRtl =" true"
1111 android : theme =" @style/AppTheme" >
12- <activity android : name =" .MainActivity" >
12+ <activity
13+ android : name =" .MainActivity"
14+ android : exported =" true" >
1315 <intent-filter >
1416 <action android : name =" android.intent.action.MAIN" />
15-
1617 <category android : name =" android.intent.category.LAUNCHER" />
1718 </intent-filter >
1819 </activity >
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ android.nonTransitiveRClass=true
2424
2525GROUP =io.github.geniusrus
2626POM_ARTIFACT_ID =multiprogressbar
27- VERSION_NAME =1.3.1
27+ VERSION_NAME =1.3.2
2828
2929POM_NAME =MultiProgressBar
3030POM_DESCRIPTION =Android library for multiple displays of progress like Instagram Stories
Original file line number Diff line number Diff line change @@ -394,17 +394,28 @@ class MultiProgressBar @JvmOverloads constructor(
394394 val value = animator.animatedValue as Float
395395 isProgressIsRunning = value != maxValue
396396
397- if ((value / progressPercents).toInt() != displayedStepForListener && value != maxValue) {
397+ val isStepChange = if ((value / progressPercents).toInt() != displayedStepForListener && value != maxValue) {
398398 displayedStepForListener = (value / progressPercents).toInt()
399+ currentAbsoluteProgress = displayedStepForListener * progressPercents.toFloat()
400+ animatedAbsoluteProgress = displayedStepForListener * progressPercents.toFloat()
399401 stepChangeListener?.onProgressStepChange(displayedStepForListener)
402+ true
400403 } else if (value == maxValue) {
404+ currentAbsoluteProgress = maxValue
405+ animatedAbsoluteProgress = maxValue
401406 finishListener?.onProgressFinished()
402- }
403-
404- if (isProgressIsRunning) {
405- currentAbsoluteProgress = value.coerceAtMost(countOfProgressSteps * progressPercents.toFloat())
407+ true
408+ } else false
409+
410+ if (value != maxValue) {
411+ if (! isStepChange) {
412+ currentAbsoluteProgress =
413+ value.coerceAtMost(countOfProgressSteps * progressPercents.toFloat())
414+ }
406415 invalidate()
407- animatedAbsoluteProgress = value
416+ if (! isStepChange) {
417+ animatedAbsoluteProgress = value
418+ }
408419 } else {
409420 animator.removeAllUpdateListeners()
410421 animatedAbsoluteProgress = 0F
You can’t perform that action at this time.
0 commit comments