Quantcast
Viewing all articles
Browse latest Browse all 3

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 type="android.os.Build" /><variable            name="model"            type="com.login.LoginViewModel" /></data><TextView        android:layout_width="match_parent"        android:layout_height="match_parent"        android:text='@{Build.VERSION.SDK_INT> Build.VERSION_CODES.N?Html.fromHtml(model.text, Html.FROM_HTML_MODE_COMPACT):Html.fromHtml(model.text)}' /></layout>

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>