Thursday, August 20, 2015

Multi Color in Single TextView Android

How To set  Multi Color in Single TextView:

programatically we can set multi color text in single TextView, first part of text show different color and other part show different color. dynamically set text on TextView.

TextView textView;

textView.setText(Html.fromHtml("<font color='#4CAF50'> Android</font> <font color='#0091EA'>Developer</font>"));

in above code first part "Android" show green color and "Developer" show blue color. so like that we can set dynamically multi color in single Textview.

No comments :

Post a Comment