Created
November 3, 2019 09:42
-
-
Save longv/d5c2ad83a9aa786393f42439f547e156 to your computer and use it in GitHub Desktop.
Usage of model attribute in data binding RecyclerView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<layout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<data> | |
<variable | |
name="listModel" | |
type="androidx.lifecycle.LiveData<me.longv.pokedex.databinding.RecyclerViewModel>"/> | |
</data> | |
<androidx.recyclerview.widget.RecyclerView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
app:model="@{listModel}"/> | |
</layout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment