Quantcast
Channel: Is it possibile to use extension functions in databinding? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

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 Article



Answer 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 Article

Is 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
Browsing latest articles
Browse All 3 View Live




Latest Images