materialish-progress icon indicating copy to clipboard operation
materialish-progress copied to clipboard

No smooth transition when progress descreasing

Open lukaci opened this issue 11 years ago • 1 comments

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.

lukaci avatar Feb 08 '15 12:02 lukaci

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).

nico2sh avatar Mar 23 '15 14:03 nico2sh