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
Is your feature request related to a problem? Please describe.
My placeholder is a vector drawable and can adjust to bounds itself properly. In a RecyclerView where all ImageViews have same bounds but final images are different resolution, the placeholder, which is rendered in final image's resolution when using crossfade (because well, CrossfadeDrawable does need some bounds and cannot just change them during the animation - but this in itself is not a problem for me as my placeholder is a vector drawable) will then be cropped if I set Scale.FILL in ImageRequest builder. I do want to crop my final image, but my placeholder should use Scale.FIT instead.
Describe the solution you'd like
Simple API where I can set scale type for placeholder to avoid it being cropped.
Additional context
I can work around this missing feature by copy pasting around 500 lines from coil3 into my project and setting a custom transition factory which has a very hacky workaround for this - but it's very annoying.
Thanks for the great library, other than this one I encountered no issues :D
The text was updated successfully, but these errors were encountered:
@nift4 Does wrapping your placeholder in a ScaleDrawable solve this issue? I'd prefer to avoid adding a new API for this as it's an uncommon use case and it's possible to implement this with one of Coil's existing extension points (Transition, Interceptor, Listener, etc.).
Is your feature request related to a problem? Please describe.
My placeholder is a vector drawable and can adjust to bounds itself properly. In a RecyclerView where all ImageViews have same bounds but final images are different resolution, the placeholder, which is rendered in final image's resolution when using crossfade (because well, CrossfadeDrawable does need some bounds and cannot just change them during the animation - but this in itself is not a problem for me as my placeholder is a vector drawable) will then be cropped if I set Scale.FILL in ImageRequest builder. I do want to crop my final image, but my placeholder should use Scale.FIT instead.
Describe the solution you'd like
Simple API where I can set scale type for placeholder to avoid it being cropped.
Additional context
I can work around this missing feature by copy pasting around 500 lines from coil3 into my project and setting a custom transition factory which has a very hacky workaround for this - but it's very annoying.
Thanks for the great library, other than this one I encountered no issues :D
The text was updated successfully, but these errors were encountered: