The method Html.fromHtml
supports loading of <img>
tags, however you're going to need to manage the way the images are fetched yourself.
Remember, this is not a web client... this is an Android app. The fromHtml
method is really a method which interprets some html tags, and creates appropriate Spannables
which best fit the html tags.
And so, we're back the the issue with the images (img
tags). Again, this is not a web client. You're going to need to load the images yourself.
To do this, you need to pass to the fromHtml
method an ImageGetter
implementing class. See example for how to implement an ImageGetter
here.
Short version - you'll need to implement a method which accepts a string of the asset name, and returns a Drawable
object. This method needs to be synchronous, which means you're going to need to pre-load all the image files from the server before-hand and have them ready to load when you call fromHtml
.