Is this possible to set different textSize in one TextView? I know that I can change text style using:
TextView textView = (TextView) findViewById(R.id.textView);
Spannable span = new SpannableString(textView.getText());
span.setSpan(arg0, 1, 10, arg3);
textView.setText(span)
I know the range start...end of text I want to change size. But what can I use as arg0
and arg3
?
Try
span.setSpan(new RelativeSizeSpan(0.8f), start, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);