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
RecyclerView.Adapter can find the layout and RecyclerView.ViewHolder corresponding to the item through layoutId.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
fun addOnItemChildClickListener(@IdRes id: Int, listener: OnItemChildClickListener<T>): ItemWrapper<T>
Register a callback to be invoked when this id corresponding view is clicked.
Link copied to clipboard
fun addOnItemChildLongClickListener(@IdRes id: Int, listener: OnItemChildLongClickListener<T>): ItemWrapper<T>
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
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.