SpannableString 设置一段文字中部分字体颜色

SpannableString strTitle = new SpannableString("病情描述(必填项,请至少填写20个字)");
strTitle.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.pre_text_gray_999)),4,19, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
diseaseDescribeTitle.setText(strTitle);

posted @ 2015-05-18 14:11  新感觉  阅读(1850)  评论(0编辑  收藏  举报