ScrollIndicatorState


Represents the state required to draw a scroll indicator (e.g., a scrollbar), which is typically provided by a scrollable component.

For scrollable components with a large number of items, such as lazy layouts, implementations may need to provide a reasonable heuristic for properties like content size, as calculating the exact value might be computationally expensive or impossible.

Summary

Public properties

Int

The total size of the scrollable content, in pixels.

Cmn
Int

The current scroll offset of the content from the start, in pixels.

Cmn
Int

The size of the visible portion of the scrollable content, in pixels.

Cmn

Public properties

contentSize

val contentSizeInt

The total size of the scrollable content, in pixels.

For a vertical scrollable component, this is the total height of the content. For a horizontal scrollable component, this is the total width of the content.

Implementations should return Int.MAX_VALUE if this value is not yet known.

scrollOffset

val scrollOffsetInt

The current scroll offset of the content from the start, in pixels.

For a vertical scrollable component, this is the Y offset. For a horizontal scrollable component, this is the X offset.

Implementations should return Int.MAX_VALUE if this value is not yet known.

viewportSize

val viewportSizeInt

The size of the visible portion of the scrollable content, in pixels.

For a vertical scrollable component, this is the height of the viewport. For a horizontal scrollable component, this is the width of the viewport.

Implementations should return Int.MAX_VALUE if this value is not yet known.