Display html formatting in listview android -


i've got list view in have dispaly text html proper formatting. though pass html string html.fromhtml method formatting align="justify" don't work.

here code snippet:

string text = "<ul><li><p><div align="justify">as part of growth plan, ranchi-based central coalfields ltd (ccl) gearing double company's production in next couple of years , increase capacity of coal washeries.</div></p></li></ul>"; 

i pass this string

spanned ntext = html.fromhtml(text); 

and display on screen

when string ntext displays on emulator screen formatting should there, i.e. text should displayed justified, gone.

please help

i have found using html.fromhtml() can hit , miss because html tags supported, , others not. justified text not supported within android because, suspect, can pretty dreadful relatively short lines of text. not surprise me if justified text not supported in fromhtml().

personally avoid justified text on small screen anyway because can difficult read.

if really need justified text, think may need write implements android.text.style.alignmentspan , write own text justification routine, not trivial task.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -