-1 How can I change text colour of one word in a textview using kotlin? don't even know where to start!

#1

How can I change text colour of one word in a textview using kotlin? don’t even know where to start!

#2

use HTMLCompat:

implementation 'androidx.core:core: '1.1.0-alpha05'

textView.setHTML("this is <font color='green'>green</font>...")

fun TextView.setHTML(text: String) {
    textView.setText(HtmlCompat.fromHtml(text, HtmlCompat.FROM_HTML_MODE_LEGACY))
}