- 设置占位符
textView.setText(getResources().getString("已知文案","未知文案"));
- 一个TextView中文字颜色不同
final ColorStateList greenColors = ColorStateList.valueOf(0xFF48E670);
SpannableString tSS = new SpannableString(str);
tSS.setSpan(new TextAppearanceSpan(null, 0, 0, greenColors, null), 0, 5, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); //前5个字是绿色
textView.setText(tSS);