html-textview
html-textview copied to clipboard
How to Set the Size of Pictures
How to Set the Size of Pictures?thanks
I also want to know the answer. Who can answer it?
It's not simple way to set size.You can use textView.setHtml(HTML_TEXT, new HtmlHttpImageGetter(textView,null,true));
,if you just set the width of image to match_parent(at the same time, the scale is correct).
@Iverlei Thank You, your code work for me..
both Your HtmlTextView and its Parent Layout width should be match_parent
and Add this line in Java
textView.setHtml(HTML_TEXT, new HtmlHttpImageGetter(textView,null,true));
In my case it was not enough to show image normally, so I added 1 method
textTextView.setHtml(articleResponse.article_html, HtmlHttpImageGetter(textTextView, null, true).apply { enableCompressImage(true) })