ItemWrapper

class ItemWrapper<T : Any> @JvmOverloads constructor(val data: T?, @LayoutRes val layoutId: Int, var clickListener: OnItemClickListener<T>? = null, var longClickListener: OnItemLongClickListener<T>? = null) : ItemType, ItemClickListener<T>

List item wrapper, used to provide layout id, click events and other related information to the adapter.

Since

1.1.1

Constructors

Link copied to clipboard
constructor(data: T?, @LayoutRes layoutId: Int, clickListener: OnItemClickListener<T>? = null, longClickListener: OnItemLongClickListener<T>? = null)

Properties

Link copied to clipboard
Link copied to clipboard
val data: T?
Link copied to clipboard
open override val layoutId: Int

RecyclerView.Adapter can find the layout and RecyclerView.ViewHolder corresponding to the item through layoutId.

Link copied to clipboard

Functions

Link copied to clipboard

Register a callback to be invoked when this id corresponding view is clicked.

Link copied to clipboard

Register a callback to be invoked when this id corresponding view is clicked and held.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Remove a callback to be invoked when this id corresponding view is clicked.

Link copied to clipboard

Remove a callback to be invoked when this id corresponding view is clicked and held.

Link copied to clipboard
open override fun setOnItemClickListener(listener: OnItemClickListener<T>?)

Register a callback to be invoked when the item is clicked.

Link copied to clipboard

Register a callback to be invoked when the item is clicked and held.