-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Not possible load image on ImageView with WRAP_CONTENT? #40
Comments
This is because we really don't know what you want with that combination. If you want the image the be as tall as the parent, unless you want to stretch or squash the image, the width must increase to match in which case we're not really obeying wrap content as the width. You can get around this using the asIs() method on your request. This disables downsampling, which is unfortunate, but it will load the image and is probably fine for a one off view. Transformations, if you're using them, will probably still fail because they won't get a valid width and height. |
I believe this is fixed here: 635d04f |
We are getting this exception while running our acceptance tests:
It seems that our ImageView has width = WRAP_CONTENT and height = MATCH_PARENT.
From the code, I can see that Glide will throw an exception if the following is not true:
Is there no way for Glide to determine that the target is an imageview that has been laid out and retrieve the dimensions from it directly?
From a quick glance, that would require quite deep changes to the model unless I am missing something
The text was updated successfully, but these errors were encountered: