android - How to apply all Html styles to a textview -
i'm trying display html content in native page. i'm parsing html content , showing in textview. but, of html styles not applied textview. example:
<p style=\" color:#c9c8cd; font-family:arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;\"> here color, font-amily, font-size , other attributes not working.
i used html.fromhtml(html) method setting html content. there way extend html class , add these styles it?
is there other alternatives.
try following,
textview mbox = new textview(context); mbox.settext(html.fromhtml("<b>" + title + "</b>" + "<br />" + "<small>" + description + "</small>" + "<br />" + "<small>" + dateadded + "</small>"));
Comments
Post a Comment