androidx.tv.foundation

Classes

PivotOffsets

This class is deprecated. BringIntoViewSpec should be used to control the position of the focused item while scrolling.

Annotations

Extension functions summary

Modifier
@ExperimentalTvFoundationApi
Modifier.scrollableWithPivot(
    state: ScrollableState,
    orientation: Orientation,
    pivotOffsets: PivotOffsets,
    enabled: Boolean,
    reverseDirection: Boolean
)

This function is deprecated. scrollableWithPivot has been deprecated.

Extension functions

scrollableWithPivot

@ExperimentalTvFoundationApi
fun Modifier.scrollableWithPivot(
    state: ScrollableState,
    orientation: Orientation,
    pivotOffsets: PivotOffsets,
    enabled: Boolean = true,
    reverseDirection: Boolean = false
): Modifier

Configure touch scrolling and flinging for the UI element in a single Orientation.

Users should update their state themselves using default ScrollableState and its consumeScrollDelta callback or by implementing ScrollableState interface manually and reflect their own state in UI when using this component.

Parameters
state: ScrollableState

ScrollableState state of the scrollable. Defines how scroll events will be interpreted by the user land logic and contains useful information about on-going events.

orientation: Orientation

orientation of the scrolling

pivotOffsets: PivotOffsets

offsets of child element within the parent and starting edge of the child from the pivot defined by the parentOffset.

enabled: Boolean = true

whether or not scrolling in enabled

reverseDirection: Boolean = false

reverse the direction of the scroll, so top to bottom scroll will behave like bottom to top and left to right will behave like right to left. drag events when this scrollable is being dragged.