RoundedCornersTransformation is not working properly
See original GitHub issueDescribe 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:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/file_preview_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:clickable="true"
android:focusable="true"
>
<ImageView
android:id="@+id/fileImage"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="1dp"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="H,1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
I am loading the picture when the onBindViewHolder
adapter method is called. On it I load an url with the following code:
fileImage.load(url) { transformations(RoundedCornersTransformation(16)) }
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
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Glide RoundedCornersTransformation not making any ...
I am using Glide 4.3.0 and wasabeef/glide-transformations to add a corner radius the bottom left and right corners of my image view. The...
Read more >Glide v4 : Transformations - GitHub Pages
If your Transformation takes no arguments, it's often easy to just use a static ... methods are not overridden, but that doesn't mean...
Read more >jp.wasabeef.glide.transformations.RoundedCornersTransformation ...
Thrown when a hostname can not be resolved. MessageFormat (java.text). Produces concatenated messages in language-neutral way. New code should probably use java ...
Read more >Android – Not able to use glide-transformations ON Glide 4.4
I can not find a way to apply RoundedCornersTransformation any more. ... and there is not a correct solution available even on their...
Read more >Displaying Images with the Picasso Library
Before Using Picasso , do not forget to add internet permission in the ... you are loading one or more large images that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Updated to latest, 0.9.1, rounded transformation is now being applied to the ImageView itself. Verified 👍
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.