onBindViewHolder

open fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int)

Implementation of Adapter.onBindViewHolder(RecyclerView.ViewHolder, int) that determines if the list item is a group or a child and calls through to the appropriate implementation of either onBindGroupViewHolder or onBindChildViewHolder.

Parameters

holder

Either the GroupViewHolder or the ChildViewHolder to bind data to

position

The flat position (or index in the list of getVisibleItemCount in the list at which to bind