android-databinding
Android Data Binding: how to pass variable to include layout
Just create <variable for passing values to included layouts. Like app:passedText=”@{@string/app_name}” Example Like I want to pass String to included layout. I will create a variable of type String. Refer that String to your TextView. I created passedText for example. <?xml version=”1.0″ encoding=”utf-8″?> <layout xmlns:android=”http://schemas.android.com/apk/res/android” > <data> // declare fields <variable name=”passedText” type=”String”/> </data> <TextView … Read more