Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No smooth transition when progress descreasing #17

Open
lukaci opened this issue Feb 8, 2015 · 1 comment
Open

No smooth transition when progress descreasing #17

lukaci opened this issue Feb 8, 2015 · 1 comment

Comments

@lukaci
Copy link

lukaci commented Feb 8, 2015

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.

@nico2sh
Copy link
Owner

nico2sh commented Mar 23, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants