摘要:
EditText editText = (EditText)findViewById(R.id.editText01); editText.setText("jiojklj"); Spannable spannable = (Spannable)editText.getText(); spannable.setSpan(new BackgroundColorSpan(Color.RED), 1, 3, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); spannable.setSpa... 阅读全文
摘要:
Spannable span = (Spannable) textView.getText();TextAppearanceSpan textappearancespan = new TextAppearanceSpan( mcontext, R.style.SynonyText);span.setSpan(textappearancespan, start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);SynonyText为Styles.xml设置的属性(颜色,字体,大小等等);注意: TextView的BufferType... 阅读全文