-
-
Notifications
You must be signed in to change notification settings - Fork 3
XML Variables
Yogesh Choudhary Paliyal edited this page Oct 12, 2021
·
1 revision
To bind your view item with Adapter using dataBinding you have to create use these Variables name must be as follows
Type should be same as your resource binding file.
This can be used to update your views in callback, after changing the variable value in model, for example check UserListingActivity.
All Adapters layout using this variable
<variable
name="binding"
type="androidx.databinding.ViewDataBinding" />
Type should be same as model you are passing to Adapter.
Content layout using this variable
<variable
name="model"
type="com.techpaliyal.androidkotlinmvvm.model.BasicModel" />
Type Any/Object, should be same as you passing while create Adapter.
Content & Error layout using this variable
<variable
name="listener"
type="com.techpaliyal.androidkotlinmvvm.model.BasicListener" />
Type will be String.
Error layout using this variable
<variable
name="message"
type="String" />