I am creating a ClickableSpan, and it is displaying properly with the proper text underlined. However, the clicks are not registering. Do you know what I am doing wrong???>
Direct Approach in Kotlin
val textHeadingSpannable = SpannableString(resources.getString(R.string.travel_agent))
val clickSpan = object : ClickableSpan(){
override fun onClick(widget: View) {
// Handel your click
}
}
textHeadingSpannable.setSpan(clickSpan,104,136,Spannable.SPAN_INCLUSIVE_EXCLUSIVE)
tv_contact_us_inquire_travel_agent.movementMethod = LinkMovementMethod.getInstance()
tv_contact_us_inquire_travel_agent.text = textHeadingSpannable