TextView tv_text = (TextView) findViewById(R.id.tv_text);
CharSequence charSequence;
String content = "<p>简介:</p><p>1.nickname:wildma!</p><p>2.职业:android攻城狮</p>";
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
charSequence = Html.fromHtml(content,Html.FROM_HTML_MODE_LEGACY);
} else {
charSequence = Html.fromHtml(content);
}
tv_text.setText(charSequence);
loadHTMLString转URLWithString
最新推荐文章于 2021-06-24 11:10:51 发布