-
Notifications
You must be signed in to change notification settings - Fork 49
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
Some images were slightly zoomed in (scale of 1.2) on load #3
Comments
Ignore the scale of 1.2 as I was mistaken. My issue is some images were slightly zoomed in instead of showing the full image on bitmap loaded. I am not sure why but I solved it by commenting out 'zoomTo' inside the overridden setFrame() function. setImageMatrix(mMatrix); What is the purpose of zoomTo? seems to be working fine without it.. and solves my problem. Hope this helps someone. And thanks for sharing the code, it is working beautifully!! |
Thank you iori57! |
- extending from MatchParentWidthImageView allows the width to be match parent, and height as per the aspect ratio - removing the zoomTo call in setFrame allowed the view to start with an initial scale as it would have with a regular imageView (or this case the matchparentwidthimageview) as per matabii/scale-imageview-android#3 - got rid of the MaxScale check (requires cleaning) to allow unlimited(?) zoom - finally added the setImageDrawable override so it works with Picasso
I wanted it to be of zoom scale 1 on load (so it looks exactly like ImageView) but on some images (depending on width to height ratio) it is zoomed slightly so can't see the whole image until manually zoom out by pinching the image.
I'm still debugging on where the calculation went wrong but haven't got an answer yet. If someone have please let me know thanks!
The text was updated successfully, but these errors were encountered: