Last active
June 17, 2020 09:46
-
-
Save tonnylitao/de1b3a1e695b8aae2cafafbb2f05dab5 to your computer and use it in GitHub Desktop.
implement RecyclerItem for https://medium.com/@tonny/recyclerview-2020-when-recyclerview-meets-data-binding-616ca5c2147d
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
data class User( | |
... | |
) : RecyclerItem { | |
override val layoutId: Int | |
get() = R.layout.list_item_user | |
override val variableId: Int | |
get() = BR.user | |
override val dataToBind: Any | |
get() = this | |
override val id: Int | |
get() = this.id | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment