我有一個問題。我想放入「TextView」html格式文本。我在下面添加如下。TextView與html表
<string name="text"><![CDATA[<table><tr><th bgcolor= #FF0000>some text</th></tr> <tr><td bgcolor= #FF0000> some text</td></tr>]]></string>
,放入TextView的是:
mInfoText.setText(Html.fromHtml(getString(R.string.text)));
但之後運行的應用程序,顯示在TextView的文本未格式化。
檢查了這一點https://github.com/SufficientlySecure/html-textview –