toSizeSpan

fun CharSequence.toSizeSpan(range: IntRange = IntRange(0, length), scale: Float = 1.5f): SpannableString

Change the size of the text in the specified range of text

Parameters

range

The range of text to be resized

scale

The zoom value, greater than 1, is larger than other text; less than 1, it is smaller than other text; the default is 1.5