The server returns html markup, I skip it through TextUtils.htmlEncode
The question is how to format the text further?
Either Encoder is superfluous and should you immediately send this text to webView?
Encoder extra. In general, if you want to display only a piece of markup, and not a full html page, then you can use TextView :
myTextView.setText(Html.fromHtml("<h2>Title</h2><br><p>Description here</p>")); API level 24 deprecated and, depending on the version, you need to use this method or the new one in a good way. - post_zeewSource: https://ru.stackoverflow.com/questions/598786/
All Articles