//strategy1是一个TextView SpannableStringBuilder builder1 = new SpannableStringBuilder(strategy1.getText().toString()); //设置前景色为蓝色 ForegroundColorSpan blue=new ForegroundColorSpan(Color.BLUE); //改变第0-3个字体颜色为蓝色 builder1.setSpan(blue,0,3, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); //改变第0-3个字体大小 builder1.setSpan(new AbsoluteSizeSpan(55),0,3,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); strategy1.setText(builder1);
posted on 2017-06-24 16:30 阅读( ...) 评论( ...)