materialish-progress
materialish-progress copied to clipboard
No smooth transition when progress descreasing
Use case: countdown.
- Not spinning
- LinearProgress = true
- The progress value is updatedUsing setProgress, and its value goes from 1f to 0f
A smooth transition is expected, but it is not smooth.
Perhaps, in the onDraw method, when not spinning, the code says:
- mProgress = Math.min(mProgress + deltaNormalized, mTargetProgress);
This kind of recalculation of mProgress is valid only when increasing from a lower value to a higher, not suited for countdown.
I will look for a solution for this, but for now this was intentional, as I didn't find any significant benefit of smoothly animate it down (compared with the complexity of adding the feature).