如何在Android上的Glide中显示Gif图片

时间:2022-09-08 21:24:46

I want show Gif image in Glide library. I write below codes but when show my gif, show very very slow motion . i want show gif normally bit rate not slow motion.

我想在Glide库中显示Gif图片。我写下面的代码,但当显示我的gif,显示非常慢的动作。我要显示gif一般比特率而不是慢速运动。

ImageView test = (ImageView) findViewById(R.id.testImageGif);
GlideDrawableImageViewTarget imageViewTarget = new GlideDrawableImageViewTarget(test);
Glide.with(this)
        .load(R.drawable.login_image)
        .into(imageViewTarget);

how can it?

怎么能呢?

1 个解决方案

#1


1  

try this

试试这个

ImageView test = (ImageView) findViewById(R.id.testImageGif);
    Glide  
    .with(this)
    .load(R.drawable.login_image)
    .asGif()
    .into(test);

#1


1  

try this

试试这个

ImageView test = (ImageView) findViewById(R.id.testImageGif);
    Glide  
    .with(this)
    .load(R.drawable.login_image)
    .asGif()
    .into(test);