toClickSpan

fun CharSequence.toClickSpan(range: IntRange = IntRange(0, length), color: Int = Color.RED, isUnderlineText: Boolean = false, clickListener: View.OnClickListener): SpannableString

Add color and click event to the text of the specified range in the text

Parameters

range

Range of target text