Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/201.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 使用StringBuilder附加HTML标记_Android - Fatal编程技术网

Android 使用StringBuilder附加HTML标记

Android 使用StringBuilder附加HTML标记,android,Android,StringBuilder的问题 我在sb.append中使用了table标签,但它没有显示table,有人能帮我解决这个问题吗 StringBuilder sb = new StringBuilder(); sb.append("<table><tr><td>A</td> <td>B</td> <td>C</td> </tr><tr><td>X</td&

StringBuilder的问题

我在sb.append中使用了table标签,但它没有显示table,有人能帮我解决这个问题吗

StringBuilder sb = new StringBuilder();
sb.append("<table><tr><td>A</td>  <td>B</td>  <td>C</td> </tr><tr><td>X</td>  <td>Y</td>  <td>Z</td> </tr></table> ");

Spanned mainContent = Html.fromHtml(sb.toString());

Log.d(TAG_ID, ""+mainContent);
StringBuilder sb=新建StringBuilder();
sb.附加(“A B C X Y Z”);
span mainContent=Html.fromHtml(sb.toString());
Log.d(标签ID“”+mainContent);

这不是
StringBuilder的问题
Html.fromHtml
不处理所有标记,只处理某些用于文本格式设置的标记。如果要显示完整的HTML,请使用。

这不是
StringBuilder的问题
Html.fromHtml
不处理所有标记,只处理某些用于文本格式设置的标记。如果要显示完整的HTML,请使用。

当前
HTML。fromHtml
不支持
标记

HTML.fromHtml
支持的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>
同样的方法

loadDataWithBaseURL(String baseUrl, String data, String mimeType, String encoding, String historyUrl)

使用baseUrl作为内容的基本URL,将给定数据加载到WebView中。

当前
Html。fromHtml
不支持
标记

HTML.fromHtml
支持的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>
同样的方法

loadDataWithBaseURL(String baseUrl, String data, String mimeType, String encoding, String historyUrl)

将给定数据加载到WebView中,使用baseUrl作为内容的基本URL。

您好,您能解释一下如何使用此请吗?您能解释一下如何使用此请吗?我想将附加的数据作为字符串发送到facebook我想如何将webview数据存储在字符串中我想将附加的数据作为字符串发送到facebook我想如何将webview数据存储在字符串中