Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 340
Dinesh Sunny Avatar asked Aug 20 '16 14:08

Dinesh Sunny


1 Answers

Here is The Best Way..

 Glide.with(getContext()).load(item[position])
                .thumbnail(Glide.with(getContext()).load(R.drawable.preloader))
                .fitCenter()
                .crossFade()
                .into(imageView);
like image 195
Mahmoud Kamal Avatar answered Oct 03 '22 14:10

Mahmoud Kamal