Android Glide placeholder size

TavoTevas picture TavoTevas · Aug 18, 2015 · Viewed 16k times · Source

I have a problem with Android Glide. I am trying to quickly swap my image, they just become all placeholder size, and my placeholder image is very low size. So what I need to do?

Maybe I need to check if it's loaded or something, but I don't know how.

Glide.with(this)
    .load(quest.get(id).getImage())
    .placeholder(R.drawable.load)
    .fitCenter()
    .crossFade()
    .into(imageView);

Answer

Ashkan Ghodrat picture Ashkan Ghodrat · Oct 27, 2015

According to this issue on Glide GitHub page you can fix it with adding following line to your request of Glide:

  .dontAnimate()

That would make your full load line:

  Glide.with(context)
            .load("http://lorempixel.com/150/150")
            .placeholder(R.drawable.no_image)
            .override(100, 100)
            .dontAnimate()
            .into(imageView);