← Back to Foundation
ScrollerPosition
Component
in
Foundation
. Since 0.1.0-dev15Overview
Code Examples
Create and remember the state for a VerticalScroller or HorizontalScroller based on the currently appropriate scroll configuration to allow changing scroll position or observing scroll behavior.
@param initial initial scroller position to start with @param isReversed whether position will be reversed, e.g. 0 will mean bottom for VerticalScroller and end for HorizontalScroller
Overloads
ScrollerPosition
@Deprecated(
"Use rememberScrollState instead", replaceWith = ReplaceWith(
"rememberScrollState(initial = initial",
"androidx.compose.foundation.rememberScrollState"
)
)
@Composable
fun ScrollerPosition(
initial: Float = 0f,
isReversed: Boolean = false
)
Parameters
Name | Description |
---|---|
initial | initial scroller position to start with |
isReversed | whether position will be reversed, e.g. 0 will mean bottom for VerticalScroller and end for HorizontalScroller |