First of all, I want to thank you for this nice wrapper around RecyclerView 👏🏻
Secondly, as a new user, the README/documentation of this repository was not very clear in informing me that for drag-and-drop to work, I need to pass in an object of ComposeRecyclerViewAdapter.ItemTypeBuilder
. I had to figure it out by trial and error.
Therefore, to make it easier for future users to get started easily, I'd request you to either mention the fact above, or better yet, instead of using null
as the default value for the itemTypeBuilder
param in ComposeRecyclerView
, give it a default non-null value that allows drag-and-drop by default.
For example:
private val DefaultItemTypeBuilder = object : ComposeRecyclerViewAdapter.ItemTypeBuilder {
override fun getItemType(position: Int): Int = 0
}
// Rest of the code
// Mention that in order to remove drag-and-drop, users would need to pass `null` into this param
itemTypeBuilder: ComposeRecyclerViewAdapter.ItemTypeBuilder = DefaultItemTypeBuilder,
// Rest of the code