NewStickyHeaderController

A controller that manages sticky headers in a RecyclerView by tracking scroll events and maintaining a floating header view that stays visible at the top when scrolling past sticky items.

This controller uses a linked list structure to efficiently track sticky header positions and handles header transitions, stacking animations, and visibility management.

Parameters

layoutInfo

Provides information about visible item positions in the RecyclerView

adapter

The adapter containing collection items, used to retrieve sticky header content

Constructors

Link copied to clipboard
constructor(layoutInfo: LayoutInfo, adapter: CollectionPrimitiveViewAdapter)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
Link copied to clipboard
fun init(stickyHeaderRecyclerView: SectionsRecyclerView)
Link copied to clipboard
open override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int)
Link copied to clipboard
Link copied to clipboard
fun reset()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Updates the sticky header when the adapter data changes.