class StickyHeaderLinearLayoutManager : LinearLayoutManager
Adds sticky headers capabilities to your RecyclerView.Adapter. The adapter / controller must override StickyHeaderCallbacks.isStickyHeader to indicate which items are sticky.
Example usage:
class StickyHeaderController() : EpoxyController() {
override fun isStickyHeader(position: Int) {
// Write your logic to tell which item is sticky.
}
}
data class SavedState : Parcelable
Save / restore existing RecyclerView state and scrolling position and offset. |
StickyHeaderLinearLayoutManager(context: Context, orientation: Int = RecyclerView.VERTICAL, reverseLayout: Boolean = false)
Adds sticky headers capabilities to your RecyclerView.Adapter. The adapter / controller must override StickyHeaderCallbacks.isStickyHeader to indicate which items are sticky. |
fun computeHorizontalScrollExtent(state: State): Int |
|
fun computeHorizontalScrollOffset(state: State): Int |
|
fun computeHorizontalScrollRange(state: State): Int |
|
fun computeScrollVectorForPosition(targetPosition: Int): PointF? |
|
fun computeVerticalScrollExtent(state: State): Int |
|
fun computeVerticalScrollOffset(state: State): Int |
|
fun computeVerticalScrollRange(state: State): Int |
|
fun isStickyHeader(view: View): Boolean
Returns true if |
|
fun onAdapterChanged(oldAdapter: Adapter<*>?, newAdapter: Adapter<*>?): Unit |
|
fun onAttachedToWindow(recyclerView: RecyclerView): Unit |
|
fun onFocusSearchFailed(focused: View, focusDirection: Int, recycler: Recycler, state: State): View? |
|
fun onLayoutChildren(recycler: Recycler, state: State): Unit |
|
fun onRestoreInstanceState(state: Parcelable?): Unit |
|
fun onSaveInstanceState(): Parcelable |
|
fun scrollHorizontallyBy(dx: Int, recycler: Recycler, state: State?): Int |
|
fun scrollToPosition(position: Int): Unit |
|
fun scrollToPositionWithOffset(position: Int, offset: Int): Unit |
|
fun scrollVerticallyBy(dy: Int, recycler: Recycler, state: State?): Int |
|
fun setStickyHeaderTranslationX(translationX: Float): Unit
Offsets the horizontal location of the sticky header relative to the its default position. |
|
fun setStickyHeaderTranslationY(translationY: Float): Unit
Offsets the vertical location of the sticky header relative to the its default position. |