Typeface robotoBold = Typeface.createFromAsset(activity.getAssets(),
"fonts/Roboto-Bold.ttf");
Typeface robotoLight = Typeface.createFromAsset(activity.getAssets(),
"fonts/Roboto-Light.ttf");
SpannableStringBuilder sb = new SpannableStringBuilder("This must be BOLd\nThis must be NORMAL");
sb.setSpan(robotoBold, 0, 17, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
sb.setSpan(robotoLight, 18, 37, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
mTextView.setText(sb);
这为我提供了整个 TextView 的正常文本。
谢谢你。