save

fun save(recyclerView: DpadRecyclerView, key: String, detachAdapter: Boolean = true)

Call this when the ViewHolder is recycled in RecyclerView.Adapter.onViewRecycled. This will clear the adapter by default to ensure that children are removed from the layout. To disable this, pass false in detachAdapter

Parameters

recyclerView

RecyclerView to be saved

key

unique identifier for recyclerView

detachAdapter

true to detach the RecyclerView.Adapter or false to skip that behavior. Default: true