DpadViewHolderState

Holds the view hierarchy state of some RecyclerView.ViewHolder. Use saveState to save a RecyclerView.ViewHolder and restoreState to restore its state.

Consider using this when you need to persist some View state (e.g text input) inside your ViewHolders.

Functions

Link copied to clipboard
fun clear()

Clears all ViewHolder states to prevent them from being restored later

fun clear(key: String)
Link copied to clipboard
fun restoreState(holder: RecyclerView.ViewHolder, key: String, consume: Boolean = false)
Link copied to clipboard