abstract class BaseListAdapter<T> : ListAdapter<T, ViewHolder>
Base list adapter to standardize and simplify initialization for this component.
itemsSame
- Function called to check whether two objects represent the same item.
contentsSame
- Function called to check whether two items have the same data.
See Also
<init> |
Base list adapter to standardize and simplify initialization for this component. BaseListAdapter(itemsSame: (T, T) -> Boolean, contentsSame: (T, T) -> Boolean) |
onCreateViewHolder |
Called when RecyclerView needs a new RecyclerView.ViewHolder of the given type to represent an item. abstract fun onCreateViewHolder(parent: ViewGroup, inflater: LayoutInflater, viewType: Int): ViewHolder open fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder |