question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RoundedCornersTransformation is not working properly

See original GitHub issue

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:

<?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 photo_2019-09-25_10-30-31

Library version 7.0.0

Related Issue #96

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
0xMatthewGrovescommented, Jan 2, 2020

Updated to latest, 0.9.1, rounded transformation is now being applied to the ImageView itself. Verified 👍

3reactions
colinrtwhitecommented, Dec 24, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found