android - Why TextView color change to blue when parsing it a string value from Html.fromHtml() -
i have html string being fetch server. i'm showing in textview this:
detailtext.settext(html.fromhtml(offer.getdetaildesc()));
now activity in textview place has black background , have set textview color white in xml. when set text of textview, color changes blue. why happening? also, there no links or color attributes in html tags string , want show text in white.
thanks
a workaround:
- download html text.
- use string class methods or matcher android class find patterns
<font color.*>
remember take shortest match always. - crop string , pass
html.fromhtml() method
- apply textview.
Comments
Post a Comment