onClick

fun SpannableString.onClick(source: String, shouldUnderline: Boolean = true, shouldBold: Boolean = true, color: Int? = null, textView: TextView? = null, onClick: () -> Unit): SpannableString

Take some text, highlight some text with a color and add a click listener to it

Parameters

source

Text to click

color

Color to change too, default = null,

onClick

Callback