public ItemLayoutRes
Specify the layout resource to be used in the view holder for an item. Annotate this to the data class used for your recycler view
@ItemLayoutRes(layoutID = R.layout.my_text_view)
data class MyData(
@ItemIdRes(viewID = R.id.textView) val name: String,
@ItemIdRes(viewID = R.id.imageView, itemType = ItemType.IMAGE) val imageResource: Int,
@ItemIdRes(viewID = R.id.button1) val btn1: String = "Add")
interface ItemIdRes
Modifier and Type | Method and Description |
---|---|
int |
layoutID()
The layout resource id
|