答案 0 :(得分:0)
您可以使用html字体颜色:
String text = textView.getText().toString();
String a = text.substring(0, text.length()-2);
String b = text.substring(text.length()-2, text.length()-1);
String c = text.substring(text.length()-1, text.length());
text = "<font color=#000000>"+a+"</font><font color=#777777>"+b+"</font>"+"<font color=#AAAAAA>"+c+"</font>";
textView.setText(Html.fromHtml(text));
结果屏幕截图: