String sm = "本功能为增值税0申报,请确认您是否进行增值税0申报?\n确认无误后,请点击下方“确认申报”按钮。";
<pre name="code" class="java">zTextView = (TextView) findViewById(R.id.zzs0sb_sm);
SpannableStringBuilder ssb = new SpannableStringBuilder(sm);
ssb.setSpan(new ForegroundColorSpan(Color.RED), 4, 10,
Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
ssb.setSpan(new ForegroundColorSpan(Color.RED), 19, 25,
Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
zTextView.setText(ssb);