I want to htmlize some data and set in the text view via data binding? Is it possible?
ie.If i have an extension function like this
fun TextView.htmlText(txt: String?) {txt.let { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { Html.fromHtml(txt, Html.FROM_HTML_MODE_COMPACT) } else { Html.fromHtml(txt) }}
}
how can i put this extension function in databinding instead of thisandroid:text="@{model.text}"