I have found some code for extracting image link from html img tag. It uses Html Java library and uses certain method fromHtml.
I have pulled html code from some RSS feed and I want to extract and display image. I have accomplished that whit code bellow but I think that this is not elegant solution at all:
Html.fromHtml(html, new Html.ImageGetter() {
@Override
public Drawable getDrawable(final String source) {
Drawable d = null;
Glide.with(mContext)
.load(source)
.into(img);
sImgUrl = source;
return d;
}
}, null);
Is it possible to extract this 'source' string without overriding getDrawable()?