SupportAdapter

Additional contract for common adapter behaviour

Inheritors

Properties

Link copied to clipboard
abstract val clickableFlow: Flow<ClickableItem>

An observer to listen for clicks on clickable items

Link copied to clipboard

Special dispatcher controller for custom logic handling

Link copied to clipboard

Get currently set animation type for recycler view holder items

Link copied to clipboard

Internal use only indicator for checking against the use of a concat adapter for headers and footers, which is in turn used to figure out how to get the view holder id

Link copied to clipboard
Link copied to clipboard
abstract val mapper: (T) -> IRecyclerItem

Mapper for adapters to converting models to recycler items

Link copied to clipboard
abstract val resources: Resources
Link copied to clipboard

Configuration for the state based footer

Link copied to clipboard

Assigned if the current adapter supports needs to supports action mode

Functions

Link copied to clipboard
open fun animateViewHolder(holder: SupportViewHolder?, position: Int)

Applies an animation on a SupportViewHolder when it is seen for the first time

Link copied to clipboard
open fun bindViewHolderByType(holder: SupportViewHolder, position: Int, payloads: List<Any> = emptyList())

Binds view holder by view type at position

Link copied to clipboard
abstract fun createDefaultViewHolder(parent: ViewGroup, @LayoutRes viewType: Int, layoutInflater: LayoutInflater): SupportViewHolder

Should provide the required view holder, this function is a substitute for androidx.recyclerview.widget.RecyclerView.Adapter.onCreateViewHolder which now has extended functionality

Link copied to clipboard
open fun getSpanSizeForItemAt(position: Int, spanCount: Int?): Int?

Should return the span size for the item at position, when called from androidx.recyclerview.widget.GridLayoutManager will be the span size for the item at the position.

Link copied to clipboard
Link copied to clipboard

Check if ISupportAdapter ->SupportListAdapter contains any list items

Link copied to clipboard

Informs view adapter of changes related to it's view holder

Link copied to clipboard
open override fun onCreate(owner: LifecycleOwner)
Link copied to clipboard
open override fun onDestroy(owner: LifecycleOwner)
Link copied to clipboard
open override fun onPause(owner: LifecycleOwner)

Notifies that ON_PAUSE event occurred.

Link copied to clipboard
open override fun onResume(owner: LifecycleOwner)
Link copied to clipboard
open override fun onStart(owner: LifecycleOwner)
Link copied to clipboard
open override fun onStop(owner: LifecycleOwner)
Link copied to clipboard
abstract fun requireItem(position: Int): T

Returns the non-nullable item for this adapter

Link copied to clipboard
open fun setLayoutSpanSize(layoutManager: GridLayoutManager)

Initial implementation is only specific for group types of recyclers, in order to customize this an override is required.

Link copied to clipboard
open fun setLoadState(state: LoadState)

Sets loading state

Link copied to clipboard
Link copied to clipboard