Change text color of one word in a TextView

Easiest way I know is to just use html.

String first = "This word is ";
String next = "<font color="#EE0000">red</font>";
t.setText(Html.fromHtml(first + next));

But this will require you to rebuild the TextView when (if?) you want to change the color, which could cause a hassle.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)