-
Notifications
You must be signed in to change notification settings - Fork 659
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
RoundedCornersTransformation is not working properly #126
Comments
This is because This will require a breaking change to the interface Transformation {
fun key(): String
suspend fun transform(pool: BitmapPool, input: Bitmap, size: Size): Bitmap
} |
If you remove this |
@colinrtwhite Any workaround in the meantime? @raj-varun I can't remove it because original pictures are not squared, but I need to show them as square :( |
Try this replace this with your image view
|
@JcMinarro If your minSDK is 21+, you could crop the image's corners as part of the I'll update this thread when the fix is in |
@colinrtwhite Did this make the cut for |
@jguerinet This didn't make it into I had a couple concerns with how to handle transformations that depend on the size of the target (like this one). If we crop the image based on the size of the target, we'll need to modify the cache key so it isn't served to a target with a different size. Rather than rush a breaking change, I pushed it back to a follow up release. |
@colinrtwhite Completely get it, thanks for the update! The alternative you proposed 3 weeks ago works just as well and is not as resource heavy in any case. Thanks for the great work! |
not work on coil 0.8.0 |
Maybe someone wrote his own |
This should now work as intended in master. To get access to this change right away, you can depend on the snapshot. Else, it'll be released on Coil 0.9.0 stable very soon. |
Updated to latest, 0.9.1, rounded transformation is now being applied to the ImageView itself. Verified 👍 |
Describe the bug
Corners are not rounded on all items of my RecyclerView.
Some pictures are rounded but other ones not.
To Reproduce
I have a RecyclerView that I initialize with a GridLayoutManager with three columns.
For every items, it is inflating a view with a layout that will be squared by a constraint into the constraintLayout that I added. The layout is the following one:
I am loading the picture when the
onBindViewHolder
adapter method is called. On it I load an url with the following code:Expected behavior
All corners should be rounded when they are shown on a RecyclerView
Logs/Screenshots
As you can see, only one picture is corners rounded. All items are inflating the same layout
Library version
7.0.0
Related Issue
#96
The text was updated successfully, but these errors were encountered: