我已经在我的项目中实现了Glide library,但问题是它滞后很多,图像速度超慢,我不想使用WebView
(如果我有的话) to,这是最后一个选项),但我想如果你们中的任何人已经实现了Alert Dialog
.gif
或者其他什么,并且知道加载一个是什么的完美尺寸.gif
请告诉我。
我放了代码,但没有必要,因为它只是一行。
Glide.with(this).load(R.raw.test).into(ivGif);
答案 0 :(得分:0)
Here if you want use Glide for load gif image:
Glide.with(context).load(myUrl)
.thumbnail(Glide.with(context).load(R.drawable.myThumbnail))
.fitCenter()
.crossFade()
.into(imageView);
I'm suggest if you use Icon libs for load gif Image, because Icon libs load image better 2x times faster than Glide. But in terms of images quality Glide is better. I post code use Icon libs for load gif image:
Ion.with(this).load(myUrl).withBitmap().asBitmap()
.setCallback(new FutureCallback<Bitmap>() {
@Override
public void onCompleted(Exception e, Bitmap result) {
// do something with your bitmap
}
});