Add support for max_width/max_height in ImageView size resolution. #1514
Labels
enhancement
New feature or request
help wanted
Issues that are up for grabs + are good candidates for community PRs
Related to #1349
Describe the bug
When loading a large image (from network or local) into an
ImageView
that is set withwrap_content
for both width & height, theViewSizeResolver
returnsDimension.Undefined
for both resulting on loading the image at full size and crashing the app with ajava.lang.RuntimeException: Canvas: trying to draw too large(233280000bytes) bitmap.
error message.That could be the normal behaviour but there are a few things to take in account:
ImageView
has amaxHeight
of300dp
, so I would expect theDimension
for height to be at max300dp
and notUndefined
To Reproduce
Just launch this app and it'll crash:
coilsample.zip
Logs/Screenshots
Version
2.2.2, no matter the Android API version
The text was updated successfully, but these errors were encountered: