0

I have a TextView with Html content and it has an img tag:

    textView.setText(Html.fromHtml(styledText, new Html.ImageGetter() {
        @Override
        public Drawable getDrawable(String source) {
            Drawable drawable = Drawable.createFromStream(epubExplorer.readDrawable(source), source);
            drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());

            return drawable;
        }
    }, null), TextView.BufferType.SPANNABLE);

The image pops out of TextView due to its large width.

How can I fit it?

Rahul Agrawal
  • 521
  • 6
  • 24

0 Answers0