onBindViewHolder

open override fun onBindViewHolder(context: Context, cards: List<Card>, viewHolder: ContentCardViewHolder, adapterPosition: Int)

Called to display the data at the specified adapter position. This method should update the contents of the ContentCardViewHolder.itemView to reflect the item at the given adapter position.

See also

RecyclerView.Adapter.onBindViewHolder

Parameters

context

The application context.

cards

The collection of card items in the adapter. Should not be modified.

viewHolder

The ContentCardViewHolder which should be updated to represent the contents of the item at the given adapter position.

adapterPosition

The position of the item within the adapter's card items.