Reputation:
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.
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?
Upvotes: 2
Views: 1289
Reputation: 612
as @SachinThampan said Here
Xml:
<ImageView
android:id="@+id/title_gif"
android:layout_width="@dimen/gif_width"
android:layout_height="@dimen/gif_height"
/>
Java:
ImageView imageView = (ImageView) findViewById(R.id.title_gif);
Glide.with(this).asGif().load(R.raw.animated_gif).into(imageView);
In build.gradle:
implementation 'com.github.bumptech.glide:glide:4.0.0'
Upvotes: 0
Reputation: 11481
try this
ImageView test = (ImageView) findViewById(R.id.testImageGif);
Glide
.with(this)
.load(R.drawable.login_image)
.asGif()
.into(test);
Upvotes: 1