I have a part of the code that calls a toString on an object and the toString basically spits out the string that will be shown on the screen.
I would like to change the color of one part of the string.
I just tried something like this:
String coloredString = solutionTopicName + " (" + commentCount + ")";
Spannable sb = new SpannableString( coloredString );
ForegroundColorSpan fcs = new ForegroundColorSpan(Color.rgb(140, 145, 160));
sb.setSpan(new ForegroundColorSpan(Color.BLUE), solutionTopicName.length(), solutionTopicName.length()+3, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
return sb.toString();
But I am still seeing the same colors appear without change.
Thanks!