↧
Answer by Anu for Is it possibile to use extension functions in databinding?
I did it using binding adapter @BindingAdapter("app:text")@JvmStaticfun htmlText(view: TextView, text: String?) { text?.let { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { view.text =...
View ArticleAnswer by BOBOZHU for Is it possibile to use extension functions in databinding?
<?xml version="1.0" encoding="utf-8"?><layout xmlns:android="http://schemas.android.com/apk/res/android"><data><import type="android.text.Html" /><import...
View ArticleIs it possibile to use extension functions in databinding?
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...
View Article