IContentCardsViewBindingHandler

An interface to define how the cards display in the ContentCardsFragment. The methods here closely mirror those of RecyclerView.Adapter and are called as part of those methods in the ContentCardAdapter.

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
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.

Link copied to clipboard
abstract 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
abstract 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
abstract fun writeToParcel(p0: Parcel, p1: Int)

Inheritors

Link copied to clipboard