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

Setting a bitmap after downloading it using an AsyncTask #25

Closed
Macarse opened this issue Mar 18, 2013 · 2 comments
Closed

Setting a bitmap after downloading it using an AsyncTask #25

Macarse opened this issue Mar 18, 2013 · 2 comments

Comments

@Macarse
Copy link
Contributor

Macarse commented Mar 18, 2013

Sephiroth:

I am running to an issue you might know how to fix it.

A sample code that reproduces the issue is hosted here:
https://github.com/Macarse/ImageViewZoom/tree/ImageViewTouchDownloadBug

I am downloading a Bitmap using an AsyncTask, but when I set it, the ImageView isn't resized according to the scaleType. If I run the sample I created in a Nexus 10 tablet, it looks like this:

screen1

where I would like it to look like this:

screen2

Any idea of how to solve this issue?

@sephiroth74
Copy link
Owner

Are you setting the

mImage.setDisplayType( DisplayType.FIT_TO_SCREEN );

before passing the new bitmap? The ImageViewTouch does not support the traditional setScaleType ( it is overridden because only ScaleType.Matrix is supported ), but it uses a different method name.
You can use DisplayType.NONE or DisplayType.FIT_TO_SCREEN

@Macarse
Copy link
Contributor Author

Macarse commented Mar 18, 2013

Oh. good to know.
Thanks!

@Macarse Macarse closed this as completed Mar 18, 2013
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