How to load gif image in placeholder of Glide/Picasso/Ion etc

Dinesh Sunny picture Dinesh Sunny · Aug 20, 2016 · Viewed 16.4k times · Source

Not able to find perfect solution for loading a gif image in placeholder

Glide
     .with(context)
     .load("imageUrl")
     .asGif()
     .placeholder(R.drawable.gifImage) 
     .crossFade()
     .into(imageView)

Tried asGif() property of Glide version 3.7.0 too. But no Luck!

Answer

Mahmoud Kamal picture Mahmoud Kamal · Oct 9, 2016

Here is The Best Way..

 Glide.with(getContext()).load(item[position])
                .thumbnail(Glide.with(getContext()).load(R.drawable.preloader))
                .fitCenter()
                .crossFade()
                .into(imageView);