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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -