HTML Tags Supported By TextView
There is a lovely method on the
fromHtml(), that converts HTML into a
Spannable for use with
However, the documentation does not stipulate what HTML tags are supported, which makes this method a bit hit-or-miss. More importantly, it means that you cannot rely on what it will support from release to release.
I have filed an issue requesting that Google formally document what it intends to support. In the interim, from a quick look at the source code, here’s what seems to be supported as of Android 2.1:
<font size="..." color="..." face="...">
Stuck on an Android problem? Subscribers have access to live office hours chats with Mark Murphy, to help you work through your challenges!