I am currently parsing some HTML code and I would like to put in a Textview. (Webview is too much, I just want something very simple).
The Html.fromHtml(mySource) is great and working fine.
This line makes my text turn in colors, bold, italic, etc...
Unfortunately, it has some inconvenients, it does not remove the comments.
Do you have any solution other than using a WebView?
Remove the comments yourself before passing the string to Html.fromHtml(). Whether you use a regular expression or an HTML parser is up to you, though this gentleman has an opinion on the matter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With