To show the characters and images in HTML in textview,

Asked 2 years ago, Updated 2 years ago, 47 views

HTML contents are in json. If you use fromHtml to get "content" from the HTML content and spray it on the textview, the text comes out well, but the html tags in the parts do not appear in the textview. It comes out as a small square, but I think they want you to use imageGetter, but the part is url.

When I searched on the Internet, it seems that all of the images in HTml are stored in String and shown, but I want the src in HTml to be displayed on the screen as soon as I receive the contents through Json parsing. What should I do?

android json html

2022-09-22 15:26

1 Answers

The default behavior of fromHtml() is not to display the image of the img tag. As you said, it is right to implement HTMI.ImageGetter to show the image.

Please refer to the implementation below and apply it to the current code.


2022-09-22 15:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.