用到了SpannableString
SpannableString spannableString = new SpannableString("这是一个字符串");
spannableString.setSpan(new ForegroundColorSpan(Color.BLACK), 0, 2 ,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
tv_person.setText(spannableString);