How to play animated GIF in TextView?

android, animated-gif, textview

Solution

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

Problem

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?

Original source