You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an interesting problem with image center crop functioning with glide. First of all I have a "square" image view which overrides the onmeasure to be square in size. If I put in a drawable, center crop functionality works fine. However If I use Glide sometimes the images gets wrapped badly. I managed to overcome the problem by changing the layout from: layout_width="wrap_content" layout_height="match_parent" to layout_width="match_parent" layout_height="match_parent". (Which is fine in my case, because the size is adjusted in the onmeasure.)
The text was updated successfully, but these errors were encountered:
It is not really a bug report, just wanted to voice this issue, maybe you guys have the answer for it, or maybe it can be a potential bug. And of course it is very hard to reproduce based on my writings :). Anyway, this "square" image hack; it worked well with the Volley NetworkImages, and worked well with standard drawables, so I assume it should work well with Glide as well.
Thanks for reporting this, Glide generally doesn't handle wrap_content well, you ran in to a particularly unusual case here where we completely ignored the dimensions of your view and used the screen dimensions instead because of wrap_content.
I'm going to dupe this into #135 where we have a larger discussion on this issue, thanks for the input, it's useful to see another case!
I have an interesting problem with image center crop functioning with glide. First of all I have a "square" image view which overrides the onmeasure to be square in size. If I put in a drawable, center crop functionality works fine. However If I use Glide sometimes the images gets wrapped badly. I managed to overcome the problem by changing the layout from:
layout_width="wrap_content" layout_height="match_parent"
tolayout_width="match_parent" layout_height="match_parent"
. (Which is fine in my case, because the size is adjusted in the onmeasure.)The text was updated successfully, but these errors were encountered: