android - String with multiple fonts and textSize in the same textView -


i have put in same textview string substrings of different sizes , colors. how can do?

enter image description here

you need create string html tags , set string textview html.fromhtml below:

((textview) findviewbyid(r.id.txt)).settext(                         html.fromhtml("<font color=\'" + "#457548"                                 + "'\" >" + "your text"                                 + "</font>"), textview.buffertype.spannable) 

more information go to: how-display-html-android


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -