I want to make "show more" in different colors but, it's not working using spannable in kotlin. please help.
val mSpannableString = SpannableString("show more")
val mBlue = ForegroundColorSpan(Color.BLUE)
mSpannableString.setSpan(mBlue,2,7,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
holder.MORE.text = "READ MORE"
if (Expert_answer.length>=300) {
holder.description.text = Expert_answer.substring(0,300)+"..."+mSpannableString
}else{
holder.description.text = Expert_answer
}

val mBlue = ForegroundColorSpan(Color.BLACK)so if you want it to be blue why are you using black?setSpanis used in java and convert it to kotlin, there is tons of examples on the net, one minute googling: developer.android.com/guide/topics/text/spans (btw they have both kotlin and java samples)