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

Android implementation, the progress always fills 100% #6

Closed
boarnoah opened this issue Mar 3, 2015 · 7 comments
Closed

Android implementation, the progress always fills 100% #6

boarnoah opened this issue Mar 3, 2015 · 7 comments
Labels

Comments

@boarnoah
Copy link
Contributor

boarnoah commented Mar 3, 2015

I tried following the sample use case scenario, it works on ios but always fills 100% on Android.
Only difference from the sample code is my index.js looks like this:

$.progress.animate({
    value: 75,
    duration: 500
});

Ti.API.info("FINISHED SHOWING indicator");
$.index.open();

Also I didn't notice it animate live (maybe it just happened too fast, but possibly related issues?)

@manumaticx
Copy link
Owner

I've just tested this again but it works fine for me. Here is my test code (essential the same):

setTimeout(function(){

  $.progress.animate({
    value: 75,
    duration: 500
  });

}, 3000);

$.index.open();

The result:
animate

@boarnoah
Copy link
Contributor Author

boarnoah commented Mar 4, 2015

@manumaticx thanks for the response.
So I just tested with your code and it works great, taking out the timeout set seems to cause it to fail. Is this kind of a common thing with using something in Titanium immediately after creating a page? Seems like my code was failing since it was trying to set an animation as soon as the screen showed up.

EDIT: So it looks like if I try to do an animate on it without waiting say more than a 1000ms it fills the full circle. This looks like a titanium having trouble loading everything fast enough issue to me. Thanks for thinking about that timeout idea.

@manumaticx
Copy link
Owner

You are actually trying to do this before the screen shows up (calling $.progress.animate() before $.index.open()). But you are right - it's a bug, I've tested with your code again it seems there is a timing problem. I'll have a look.

@manumaticx
Copy link
Owner

Weird titanium bug. Don't ask! 😉

It should work now without the timeout

@boarnoah
Copy link
Contributor Author

boarnoah commented Mar 9, 2015

Just looked at your commit it makes absolutely no sense but I'll take it. Thanks and good job!

@rondog
Copy link

rondog commented Mar 9, 2015

a lot of titanium fixes I'll never understand

@manumaticx
Copy link
Owner

As I said... weird! It took me one hour to spot this. But it's a known issue which will be fixed in Ti 4.0

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

No branches or pull requests

3 participants