I'm using TextView
for displayng text with GIF
images:
Html.ImageGetter imageGetter=new Html.ImageGetter imageGetter() {
public Drawable getDrawable(String source) {
return getDrawableFromSd(String source);
}
}
mtTextView.setText(Html.fromHtml(text,imageGetter,null));
Some files are animated, but it doesn't animate when displaying in TextView
. How to display it with animation?
You can use Glide to display gif rather than using WebView. its as simple as
Glide.with(context)
.load(gifImageUrl)
.asGif()
.placeholder(R.drawable.loading)
.crossFade()
.into(imageView);
You may also like to read this post :- http://inthecheesefactory.com/blog/get-to-know-glide-recommended-by-google/en
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With