Obsolete
Status Update
Comments
sa...@google.com <sa...@google.com> #2
Thank you for your feedback. We assure you that we are doing our best to address the issue reported, however our product team has shifted work priority that doesn't include this issue. For now, we will be closing the issue as won't fix obsolete. If this issue currently still exists, we request that you log a new issue along with latest bug report here https://goo.gl/TbMiIO .
Description
Whenever a value of "white" is given for the color attribute of the font tag, Html.fromHtml(String) does not change the color, and the span is not added. This is because the value of Color.WHITE = -1 (#ffffffff), which is the same int used to mark a color that wasn't found or NumberFormatException. The relevant code is in Html.endFont.
This can be fixed by allowing Color.getHtmlColor(String) to return Integer rather than int, and use null to indicate that a color was not found.
There also seems to be an issue where passing in an alpha value (e.g. color='#ffffffff') doesn't work (XmlUtils.convertValueToInt(String, int) throws a NumberFormatException). Using '#ffffff' works.