DefaultContentCardsViewBindingHandler

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun describeContents(): Int
Link copied to clipboard

Gets a cached instance of a BaseContentCardView for view creation/binding for a given CardType. If the CardType is not found in the cache, then a view binding implementation for that CardType is created and added to the cache.

Link copied to clipboard
open override 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.

Link copied to clipboard
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.

Link copied to clipboard
open override fun onCreateViewHolder(context: Context, cards: List<Card>, viewGroup: ViewGroup, viewType: Int): ContentCardViewHolder

Creates an ContentCardViewHolder of the given type to represent an item in the ContentCards. You can create a new View manually or inflate it from an XML layout file.

Link copied to clipboard
open override fun writeToParcel(dest: Parcel, flags: Int)