Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Setting a Duration #29

Closed
codyjhsieh opened this issue Aug 27, 2014 · 3 comments
Closed

Setting a Duration #29

codyjhsieh opened this issue Aug 27, 2014 · 3 comments

Comments

@codyjhsieh
Copy link

Although some people have asked this question all have eventually figured out how to set a duration (ex. 20000 milliseconds) before a published answer could be posted. How do I animate the holocircularprogressbar much like the countdown timer so that an input would show a smooth animation that lasts the length of the input?

@passsy
Copy link
Owner

passsy commented Aug 27, 2014

Look in the sample Project https://github.com/passsy/android-HoloCircularProgressBar/blob/master/sample/src/de/passsy/circularprogressbarsample/CircularProgressBarSample.java#L183

    HoloCircularProgressBar progressBar = (HoloCircularProgressBar) findViewById(R.id.holoCircularProgressBar1);
    // animate from 0 to 1
    ObjectAnimator progressBarAnimator = ObjectAnimator.ofFloat(progressBar, "progress", 0, 1);
    // in 20000ms
    progressBarAnimator.setDuration(20000);
    progressBarAnimator.start();

@passsy passsy closed this as completed Aug 27, 2014
@codyjhsieh
Copy link
Author

However any value above 1000 milliseconds causes stuttering in the animation and does not last the correct duration.

@passsy
Copy link
Owner

passsy commented Aug 27, 2014

I can't reproduce this behavior. It's absolutely smooth. See this app for example: https://play.google.com/store/apps/details?id=personal.andreabasso.clearfocus&hl=de

set the duration to 2 minutes and click start.

There must be another issue in your code

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

No branches or pull requests

2 participants