SmartViewHolder

class SmartViewHolder(val view: View, val binding: ViewBinding? = null) : RecyclerView.ViewHolder

A lightweight, stateful RecyclerView.ViewHolder that serves as the root for all Verses items.

It maintains state for performance optimizations like the "Bind Lock" and "One-time Optimization Flag".

Constructors

Link copied to clipboard
constructor(view: View, binding: ViewBinding? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val binding: ViewBinding?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val view: View

Functions

Link copied to clipboard
fun <T> itemData(): T

Retrieves the business data object, cast to the expected type T.

Link copied to clipboard
fun prepare(data: Any)

Prepares the holder for a new binding cycle.

Link copied to clipboard
fun setIsRecyclable(recyclable: Boolean)