I have a Spanned text with some formatting. How do I convert it into a String based on that formatting?

124 views Asked by At
Spanned spanned = article.getArticleBody();
TextView body =(TextView) rootView.findViewById(R.id.article_body);

How do I print this in body TextView

1

There are 1 answers

0
AskNilesh On

try this

Spanned spanned = article.getArticleBody(); 
body.setText(Html.toHtml(spannedText));

or this

 body.setText(spannedText);