onBindViewHolder

open override fun onBindViewHolder(holder: CommentsViewHolder, position: Int)

Called by RecyclerView to display the data at the specified position.

Parameters

holder

The ViewHolder which should be updated to represent the contents of the item at the given position in the data set.

position

The position of the item within the adapter's data set.