ContentCardAdapter

Constructors

Link copied to clipboard
fun ContentCardAdapter(context: Context, layoutManager: LinearLayoutManager, cardData: MutableList<Card>, contentCardsViewBindingHandler: IContentCardsViewBindingHandler)

Functions

Link copied to clipboard
Link copied to clipboard
fun getCardAtIndex(index: Int): Card?
Link copied to clipboard
open override fun getItemCount(): Int
Link copied to clipboard
open override fun getItemId(position: Int): Long
Link copied to clipboard
open override fun getItemViewType(position: Int): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun isAdapterPositionOnScreen(adapterPosition: Int): Boolean

Gets whether the item at a position is visible on screen.

Link copied to clipboard
fun isControlCardAtPosition(adapterPosition: Int): Boolean

Returns whether the card at the adapter position is a control card.

Link copied to clipboard
open override fun isItemDismissable(position: Int): Boolean
Link copied to clipboard
fun logImpression(card: Card?)

Logs an impression on the card. Performs a check against the known set previously impressed card ids. Will also set the viewed state of the card to true.

Link copied to clipboard

Marks every on-screen card as read.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun notifyItemMoved(p0: Int, p1: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun onBindViewHolder(viewHolder: ContentCardViewHolder, position: Int)
Link copied to clipboard
open override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): ContentCardViewHolder
Link copied to clipboard
open override fun onItemDismiss(position: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun replaceCards(newCardData: List<Card>)
Link copied to clipboard
open fun setHasStableIds(p0: Boolean)

Properties

Link copied to clipboard

A list of the impressed card ids.