getItemViewType

abstract fun getItemViewType(context: Context, cards: List<Card>, adapterPosition: Int): Int

Returns the view type of the item at the given position for the purposes of view recycling purposes.

Return

A value identifying the type of the view needed to represent the item at position. Type values need not be contiguous.

Parameters

context

The application context.

cards

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

adapterPosition

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