Android 中载入 HTML 有两种方式:
1. 用 TextView.setText(Html.fromHtml("<html></html>"));
优点:载入速度快
缺点:不支持所有 html 标签,支持的有:
<a href="...">
<b>
<big>
<blockquote>
<br>
<cite>
<dfn>
<div align="...">
<em>
<font size="..." color="..." face="...">
<h1>
<h2>
<h3>
<h4>
<h5>
<h6>
<i>
<img src="...">
<p>
<small>
<strike>
<strong>
<sub>
<sup>
<tt>
<u>
2. 用 WebView.loadData("<html></html>", "text/html", "utf-8");
缺点:性能比 TextView 略低
优点:支持所有 html 标签