I am using a TextView to show some text I have formatted from HTML:
Spanned s = Html.fromHtml(getString(R.string.disclaimer));
tvDisclaimer.setText(s);
The text is in the strings.xml using CDATA:
<string name="disclaimer">
<![CDATA[
<p>blablabla</p>
<ul>
<li>foo
<li>bar
</ul>
]]>
</string>
The point now, is that the whole thing crashes with an IndexOutOfBoundsException in Choreographer. It works for some simple HTML, but at some point, I only have to add one character (ø) to have it crash. Removing the character makes it work.
If Html.fromHtml() is not the way to go, what could I use to get some decent rich text in my app?
<ul>and<li>are not supported byHtml.fromHtml(), you have bigger problems.