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

setImageUri takes too long #3

Closed
gmarques33 opened this Issue Mar 25, 2015 · 7 comments

Comments

Projects
None yet
3 participants
@gmarques33

gmarques33 commented Mar 25, 2015

When I get a photo from G+ Photos app, sometimes this need to be downloaded. In this case the app will hang for some time and I get an ANR.

With older devices, decodeBitmat takes too long too.

I think that setImageUri needs to be executed on a background thread. The method setImageUri can accept a callback and return after the job has done.

@sethgho

This comment has been minimized.

Show comment
Hide comment
@sethgho

sethgho May 6, 2015

This seems like a problem worth solving. @ArthurHub, what do you think the right answer should be here? Disabling the crop support and drawing some sort of loading indicator on the crop image view while downloading the Bitmap?

sethgho commented May 6, 2015

This seems like a problem worth solving. @ArthurHub, what do you think the right answer should be here? Disabling the crop support and drawing some sort of loading indicator on the crop image view while downloading the Bitmap?

@ArthurHub

This comment has been minimized.

Show comment
Hide comment
@ArthurHub

ArthurHub May 10, 2015

Owner

Yep, that sounds reasonable, maybe provide the client with optional widget to be placed while it is loading.

Owner

ArthurHub commented May 10, 2015

Yep, that sounds reasonable, maybe provide the client with optional widget to be placed while it is loading.

@sethgho

This comment has been minimized.

Show comment
Hide comment
@sethgho

sethgho May 11, 2015

Hmm... how about an async overload of setImageUri with just a basic success/failure callback? That should let the client toggle whatever UI state they want.

sethgho commented May 11, 2015

Hmm... how about an async overload of setImageUri with just a basic success/failure callback? That should let the client toggle whatever UI state they want.

@gmarques33

This comment has been minimized.

Show comment
Hide comment
@gmarques33

gmarques33 May 11, 2015

@sethgho That's exactly what I did.
I will improve the code and make a pull request.

gmarques33 commented May 11, 2015

@sethgho That's exactly what I did.
I will improve the code and make a pull request.

@sethgho

This comment has been minimized.

Show comment
Hide comment
@sethgho

sethgho commented May 11, 2015

👍

@ArthurHub

This comment has been minimized.

Show comment
Hide comment
@ArthurHub

ArthurHub May 12, 2015

Owner

👍

Owner

ArthurHub commented May 12, 2015

👍

@ArthurHub ArthurHub self-assigned this Dec 19, 2015

@ArthurHub

This comment has been minimized.

Show comment
Hide comment
@ArthurHub

ArthurHub Dec 26, 2015

Owner

added setImageUriAsync(Uri) and getCroppedImageAsync() in v1.1.0

Owner

ArthurHub commented Dec 26, 2015

added setImageUriAsync(Uri) and getCroppedImageAsync() in v1.1.0

@ArthurHub ArthurHub closed this Dec 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment