BaseViewHolder

public abstract class BaseViewHolder<T extends Object> extends RecyclerView.ViewHolder

BaseViewHolder is a generic class that takes a binding and a data type

Parameters

T
  • data type

binding
  • view binding

Inheritors

Constructors

Link copied to clipboard
public BaseViewHolder<T> BaseViewHolder(ViewBinding binding)

Properties

Link copied to clipboard
private final ViewBinding binding
Link copied to clipboard
private T mData

Functions

Link copied to clipboard
public abstract Unit bindData(T data)

Bind data to the view

Link copied to clipboard
public final ViewBinding getBinding()
Link copied to clipboard
public final T getMData()
Link copied to clipboard
public final Unit setMData(T mData)