I want to display some HTML content in a TextView. The content is dynamically parsed using JSON parsing. Given below is extracted from the JSON response I got, when I tried the link in browser.
<p><font color='#FF0000'><strong>MESSAGE BLOCKED.</strong></font><br />nThank you.</p>
But when I finished parsing in phone,the html tags looked like:
"& lt;","p >" etc
I have no idea why this is happening. Please Help. Thanks in advance
res is the String(From Server)
Spanned sp = Html.fromHtml(res.replace("<", "<").replace(">", ">"));
textview.setText(sp);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.