SupportErrorItem

class SupportErrorItem(loadState: LoadState, configuration: IStateLayoutConfig) : RecyclerItem

View holder for representing loading errors

Since

v1.2.0

Constructors

Link copied to clipboard
constructor(loadState: LoadState, configuration: IStateLayoutConfig)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val decorator: ISelectionDecorator

Decorator that can be used to style this item when it is selected or unselected

Link copied to clipboard
open override val id: Long

id of the item view

Link copied to clipboard
open override val supportsSelectionMode: Boolean = false

If selection mode can be used, this will allow automatic styling of elements based on selection state when the view item/s are drawn

Functions

Link copied to clipboard
open override fun bind(view: View, position: Int, payloads: List<Any>, stateFlow: MutableStateFlow<ClickableItem>, selectionMode: ISupportSelectionMode<Long>?)

Called when the view needs to be setup, this could be to set click listeners, assign text, load images, e.t.c

Link copied to clipboard
open override fun getSpanSize(spanCount: Int, position: Int, resources: Resources): Int

Provides a preferred span size for the item

Link copied to clipboard
open override fun unbind(view: View)

Called when the view needs to be recycled for reuse, clear any held references to objects, stop any asynchronous work, e.t.c