material-components / material-components/material-components-android
[ShapeableImageView] Using Glide and cross fade transitions fails sometimes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** When loading a ShapeableImageView with Glide and applying a cross fade transition makes the ShapeableImageView to sometimes not make the corners properly. Worth mentioning is that the ShapeableImageView was inside a RecyclerView. Something that might help finding the issue is that the issue is much more prevalent in version 1.2.0. In that one almost never does the ImageView show the correct shape. But in 1.3.0 it only happens sometimes.
**Expected behavior:** The corners should appear as expected.
**Source code:**
* Loading:
```
val view: ShapeableImageView
val url: String
val placeHolder: Drawable
Glide.with(view)
.load(url)
.placeholder(placeholder)
.error(placeholder)
.fallback(placeholder)
.transition(DrawableTransitionOptions.withCrossFade(200))
.into(view)
```
* ShapeableImageView:
```
```
* ShapeAppearance:
```
<item name="cornerSize">8dp</item>
```
**Android API version:** 30
**Material Library version:** 1.3.0 and 1.2.0.
**Device:** Pixel 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided ShapeableImageView example in a RecyclerView with Glide cross-fade transitions on Android API 30, comparing Material Library versions 1.2.0 and 1.3.0. Confirm the intermittent corner-rendering failure and define completion as corners remaining correct while placeholders and loaded images transition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- design, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100