Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

How to Set the Size of Pictures #161

Open
HelloAnyu opened this issue Jun 18, 2019 · 4 comments
Open

How to Set the Size of Pictures #161

HelloAnyu opened this issue Jun 18, 2019 · 4 comments

Comments

@HelloAnyu
Copy link

How to Set the Size of Pictures?thanks

@asceee
Copy link

asceee commented Sep 13, 2019

I also want to know the answer. Who can answer it?

@Iverlei
Copy link

Iverlei commented Oct 10, 2019

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).

@frared358
Copy link

frared358 commented Mar 24, 2020

@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));

@almakhanov
Copy link

almakhanov commented Jul 13, 2020

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) })

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants