0

私のアプリは、テキストビューで短いHTMLソースを表示できます。ただし、長いHTMLソースでは、機能しません。HTMLはWebブラウザで正しく表示されます。

HTMLの例:

<font color='#26D4CB' /><u>Title</u></font><br>Text<br><br><font color='#26D4CB' /><u>Title Title Title Title Title Title</u></font><br>some long text some long text some long text some long text <br><br><font color='#26D4CB' /><u>Title Title Title Title Title Title</u></font><br><br><font color='#26D4CB' /><u>Title Title Title Title Title Title</u></font><br>+ rework of the emoji picker<br>some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text 

私は両方を使用しています

tvChangelog.setText(Html.fromHtml(changelog),TextView.BufferType.SPANNABLE);

tvChangelog.setText(Html.fromHtml(changelog));

しかし、どちらも結果を達成していません。何か案が?

4

1 に答える 1

0

HTMLが正しくないようです(特に<font>要素)。次のように置き換えてみてください。

<font color='#26D4CB'><u>Title</u></font><br>Text<br><br><font color='#26D4CB'><u>Title Title Title Title Title Title</u></font><br>some long text some long text some long text some long text <br><br><font color='#26D4CB'><u>Title Title Title Title Title Title</u></font><br><br><font color='#26D4CB'><u>Title Title Title Title Title Title</u></font><br>+ rework of the emoji picker<br>some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text</u></font>
于 2012-11-14T09:12:38.700 に答える