bumptech / bumptech/glide

[Bug] Adding transition crossfade causes placeholder to resize

Open
#4,379 2 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

When using Glide with a placeholder and using the transition crossfade, it causes it to have an unwanted resizing effect on the placeholder.

The size of the placeholder should be 50dp inside the layerlist drawable.

With ```crossFade()```:

https://www.youtube.com/watch?v=7FlCJDSwoAI

Without ```crossFade()```:

https://www.youtube.com/watch?v=vqZKZb-BKqE

```
Glide.with(context)
.load(itemList.get(i))
.apply(RequestOptions.fitCenterTransform())
.placeholder(R.drawable.ic_altered_placeholder)
.transition(DrawableTransitionOptions.withCrossFade())
.into(holder.imageView);
```

Viewholder:

```

```

The drawable placeholder:

```


```

Is there a fix for this issue?

_____________________________________________________________
Heres the code to replicate:

MainActivity: https://pastebin.com/3G7BMct3

RecyclerAdapter: https://pastebin.com/eX3T4w9s

Viewholder: https://pastebin.com/Yvri5XFf

Placeholder: https://pastebin.com/pKputgmG

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.