SpannableString styledText =
new
SpannableString(
"
呵呵,我在叫你
"
);
styledText.setSpan(
new
TextAppearanceSpan(
this
, R.
style
.
style0
),
0
,
3
, Spanned.
SPAN_EXCLUSIVE_EXCLUSIVE
);
styledText.setSpan(
new
TextAppearanceSpan(
this
, R.
style
.
style1
),
3
,
5
, Spanned.
SPAN_EXCLUSIVE_EXCLUSIVE
);
mTextView
.setText(styledText, TextView.BufferType.
SPANNABLE
);