Glide not loading real image and stuck with placeholder

TareK Khoury picture TareK Khoury · Apr 3, 2016 · Viewed 52.3k times · Source

I have a pretty basic load image from server line code:

Glide.with(view.getContext()).load(url).placeholder(R.drawable.default_profile).into(view);

For some reason, I'm always stuck with the placeholder being displayed and never the real image!

I have made sure that a valid and working url is being passed. And, if I use the same code without the placeholder it works fine

Glide.with(view.getContext()).load(url).into(view);

Any ideas why?

Answer

Abbes Yassine picture Abbes Yassine · Apr 3, 2016

Try to add .dontAnimate() It caused by TransitionDrawable too and it seems so because after scroll there's no animation because it's cached.

The correct code is

Glide.with(view.getContext()).load(url).placeholder(R.drawable.default_profile).dontAnimate().into(view);

I hope it will be helpful for you.