INNER CODE UNIT · Kotlin
ViewHolder
mikepenz/FastAdapter · fastadapter/src/main/java/com/mikepenz/fastadapter/FastAdapter.kt:855
abstract class ViewHolder<Item : GenericItem>(itemView: View) : RecyclerView.ViewHolder(itemView) {
/** Binds the data of this item onto the viewHolder */
abstract fun bindView(item: Item, payloads: List<Any>)
/** View needs to release resources when its recycled */
abstract fun unbindView(item: Item)
/** View got attached to the window */
open fun attachToWindow(item: Item) {}
/** View got detached from the window */
open fun detachFromWindow(item: Item) {}
/**
* View is in a transient state and could not be recycled
*
* @return return true if you want to recycle anyways (after clearing animations or so)