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

CircularProgressDrawable always recieves animation fraction 1.0 #58

Open
tomkoptel opened this issue Oct 15, 2014 · 12 comments
Open

CircularProgressDrawable always recieves animation fraction 1.0 #58

tomkoptel opened this issue Oct 15, 2014 · 12 comments

Comments

@tomkoptel
Copy link

Hello! First of all, thanks for nice library :)

Ok, now about issue.
_Before fix_
Lag of progress
P.S. Taken from demo app from Play Store.

On Nexus 4 runing android 4.2.2 I've reproduced bug of circular progress bar lagging. When I've debuged issue I found that animation toggles between 2 sweep angles one is 20 another 300. On ui it makes effect of progress bar rotating with high speed. Here is the line code which point to the problem I see. During runtime animatedFraction always has 1.0 value which messes animation at all.

Temporary fix.
Add dependency on NineOld and replaced imports within CircularProgressDrawable

dependencies {
    compile 'com.nineoldandroids:library:2.4.0'
}

This made ValueAnimator to return proper animatedFraciton value.

_After fix_
Fix for progress

Can you take a look on issue? I would like to use pure dependency instead of bundling sources of lib in my project, also using Nine old is not what I need, because I'm not targeting old platform.

Looking forward your response.
Best regards, Tom Koptel.

@castorflex
Copy link
Owner

Cool, thank you for your detailed issue! I will have a look at it asap.

@castorflex
Copy link
Owner

Hey, I wasn't able to reproduce your bug, but I tried to fix it anyway. Can you try it ? I uploaded a snapshot, all you need is:

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

dependencies {
    compile 'com.github.castorflex.smoothprogressbar:library-circular:1.0.2-SNAPSHOT@aar'
}

If you wanna take a look, I made a new branch => https://github.com/castorflex/SmoothProgressBar/tree/issue58

@tomkoptel
Copy link
Author

Hi!

I haven't debug your changes for now. Will do it later.
Anyway, I`m still reproducing this behavior on android 4.2.2.

Thank you for changes!

@castorflex
Copy link
Owner

I've just updated the demo on the store. Can you test it?

@Wolftein
Copy link

I have the same issue on 1.0.2.

@castorflex
Copy link
Owner

Hi @Wolftein, are you also under 4.2.2 ?

@Wolftein
Copy link

@castorflex i'm currently using 4.4.4 (CyanogenMod v11 M1) the visual effect that i have is similar like it reachs a point and flickers the animation and then goes back to initial state.

@tomkoptel
Copy link
Author

@castorflex hi, there! I was looking into issue while debugging MakeCustomActivity.
So far I have found that lag starts after invocation of this peace of code.

Also I found that my initial assumption isn't right. So animation fraction is properly calculated. However, I have no idea what makes this lag. Hope my references will give you an idea of what is went wrong.

P.S. I'm testing on Google Nexus 4 on Android 4.3 image flashed inside Genymotion 2.3.0.

@rjam
Copy link

rjam commented Feb 11, 2015

👍 I can confirm this happens on an S5 running 4.4 as well while on a Nexus 5 running lollipop everything is fine

@castorflex
Copy link
Owner

Did you guys try with the last release? (v1.1.0)

@bradroid
Copy link

The bug still occurs, tested on Android 4.4.4

@jemshit
Copy link

jemshit commented Dec 17, 2015

Tried v1.1.0 on S5, on lollipop, it works good. Before i was using v1.0.+ and it had problem

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

6 participants