Issue
I have a problem. I want to put in to the "TextView" html format text. I add the like below.
<string name="text"><![CDATA[<table><tr><th bgcolor= #FF0000>some text</th></tr> <tr><td bgcolor= #FF0000> some text</td></tr>]]></string>
and put it into the TextView as:
mInfoText.setText(Html.fromHtml(getString(R.string.text)));
but after run application, displayed text in TextView is not formatted.
Solution
Android TextView doesn't support the Table tag and that's the reason you can't see it in a formatted way. You must use a WebView for this purpose.
To know what are the tags supported check this Html List tag not working in android textview. what can i do?
Answered By - Andro Selva
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.