| <html devsite="true"> |
| <head> |
| <title>ScrollState</title> |
| {% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <div id="metadata-info-block"></div> |
| <h1>ScrollState</h1> |
| <p> |
| <pre>class <a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html">ScrollState</a> : <a href="/reference/kotlin/androidx/compose/foundation/gestures/ScrollableState.html">ScrollableState</a></pre> |
| </p> |
| <hr> |
| <p>State of the scroll. Allows the developer to change the scroll position or get current state by calling methods on this object. To be hosted and passed to <code><a href="/reference/kotlin/androidx/compose/foundation/package-summary.html#(androidx.compose.ui.Modifier).verticalScroll(androidx.compose.foundation.ScrollState,kotlin.Boolean,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean)">Modifier.verticalScroll</a></code> or <code><a href="/reference/kotlin/androidx/compose/foundation/package-summary.html#(androidx.compose.ui.Modifier).horizontalScroll(androidx.compose.foundation.ScrollState,kotlin.Boolean,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean)">Modifier.horizontalScroll</a></code></p> |
| <p>To create and automatically remember <code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html">ScrollState</a></code> with default parameters use <code><a href="/reference/kotlin/androidx/compose/foundation/package-summary.html#rememberScrollState(kotlin.Int)">rememberScrollState</a></code>.</p> |
| <p>Learn how to control the state of <code><a href="/reference/kotlin/androidx/compose/foundation/package-summary.html#(androidx.compose.ui.Modifier).verticalScroll(androidx.compose.foundation.ScrollState,kotlin.Boolean,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean)">Modifier.verticalScroll</a></code> or <code><a href="/reference/kotlin/androidx/compose/foundation/package-summary.html#(androidx.compose.ui.Modifier).horizontalScroll(androidx.compose.foundation.ScrollState,kotlin.Boolean,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Boolean)">Modifier.horizontalScroll</a></code>:</p> |
| <pre class="prettyprint"> |
| import androidx.compose.foundation.gestures.scrollBy |
| import androidx.compose.foundation.gestures.animateScrollBy |
| import androidx.compose.foundation.horizontalScroll |
| import androidx.compose.foundation.layout.Column |
| import androidx.compose.foundation.layout.Row |
| import androidx.compose.foundation.rememberScrollState |
| import androidx.compose.material.Text |
| import androidx.compose.runtime.rememberCoroutineScope |
| |
| // Create ScrollState to own it and be able to control scroll behaviour of scrollable Row below |
| val scrollState = rememberScrollState() |
| val scope = rememberCoroutineScope() |
| Column { |
| Row(Modifier.horizontalScroll(scrollState)) { |
| repeat(1000) { index -> |
| Square(index) |
| } |
| } |
| // Controls for scrolling |
| Row(verticalAlignment = Alignment.CenterVertically) { |
| Text("Scroll") |
| Button( |
| onClick = { |
| scope.launch { scrollState.scrollTo(scrollState.value - 1000) } |
| } |
| ) { |
| Text("< -") |
| } |
| Button( |
| onClick = { |
| scope.launch { scrollState.scrollBy(10000f) } |
| } |
| ) { |
| Text("--- >") |
| } |
| } |
| Row(verticalAlignment = Alignment.CenterVertically) { |
| Text("Smooth Scroll") |
| Button( |
| onClick = { |
| scope.launch { scrollState.animateScrollTo(scrollState.value - 1000) } |
| } |
| ) { |
| Text("< -") |
| } |
| Button( |
| onClick = { |
| scope.launch { scrollState.animateScrollBy(10000f) } |
| } |
| ) { |
| Text("--- >") |
| } |
| } |
| }</pre> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%"><h3>Public companion properties</h3></th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code><a href="/reference/kotlin/androidx/compose/runtime/saveable/Saver.html">Saver</a><<a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html">ScrollState</a>, *></code></td> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.Companion.html#Saver()">Saver</a></code></div> |
| <p>The default <code><a href="/reference/kotlin/androidx/compose/runtime/saveable/Saver.html">Saver</a></code> implementation for <code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html">ScrollState</a></code>.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%"><h3>Public constructors</h3></th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#ScrollState(kotlin.Int)">ScrollState</a>(initial: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%"><h3>Public functions</h3></th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code>suspend <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#animateScrollTo(kotlin.Int,androidx.compose.animation.core.AnimationSpec)">animateScrollTo</a>(value: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>, animationSpec: <a href="/reference/kotlin/androidx/compose/animation/core/AnimationSpec.html">AnimationSpec</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>>)</code></div> |
| <p>Scroll to position in pixels with animation.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a></code></td> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#dispatchRawDelta(kotlin.Float)">dispatchRawDelta</a>(delta: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>)</code></div> |
| <p>Dispatch scroll delta in pixels avoiding all scroll related mechanisms.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>open suspend <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></code></td> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#scroll(androidx.compose.foundation.MutatePriority,kotlin.coroutines.SuspendFunction1)">scroll</a>(scrollPriority: <a href="/reference/kotlin/androidx/compose/foundation/MutatePriority.html">MutatePriority</a>, block: suspend <a href="/reference/kotlin/androidx/compose/foundation/gestures/ScrollScope.html">ScrollScope</a>.() <span style="white-space: nowrap;">-></span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>)</code></div> |
| <p>Call this function to take control of scrolling and gain the ability to send scroll events via <code><a href="/reference/kotlin/androidx/compose/foundation/gestures/ScrollScope.html#scrollBy(kotlin.Float)">ScrollScope.scrollBy</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>suspend <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a></code></td> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#scrollTo(kotlin.Int)">scrollTo</a>(value: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div> |
| <p>Instantly jump to the given position in pixels.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%"><h3>Public properties</h3></th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code><a href="/reference/kotlin/androidx/compose/foundation/interaction/InteractionSource.html">InteractionSource</a></code></td> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#interactionSource()">interactionSource</a></code></div> |
| <p><code><a href="/reference/kotlin/androidx/compose/foundation/interaction/InteractionSource.html">InteractionSource</a></code> that will be used to dispatch drag events when this list is being dragged.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>open <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></code></td> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#isScrollInProgress()">isScrollInProgress</a></code></div> |
| <p>Whether this <code><a href="/reference/kotlin/androidx/compose/foundation/gestures/ScrollableState.html">ScrollableState</a></code> is currently scrolling by gesture, fling or programmatically or not.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#maxValue()">maxValue</a></code></div> |
| <p>maximum bound for <code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#value()">value</a></code>, or <code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/-m-a-x_-v-a-l-u-e.html">Int.MAX_VALUE</a></code> if still unknown</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#value()">value</a></code></div> |
| <p>current scroll position value in pixels</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Public companion properties</h2> |
| <div><a name="getSaver()"></a><a name="setSaver()"></a><a name="getSaver--"></a><a name="setSaver--"></a> |
| <h3 class="api-name" id="Saver()">Saver</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/compose/foundation/ScrollState.Companion.html#Saver()">Saver</a>: <a href="/reference/kotlin/androidx/compose/runtime/saveable/Saver.html">Saver</a><<a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html">ScrollState</a>, *></pre> |
| <p>The default <code><a href="/reference/kotlin/androidx/compose/runtime/saveable/Saver.html">Saver</a></code> implementation for <code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html">ScrollState</a></code>.</p> |
| </div> |
| <h2>Public constructors</h2> |
| <div><a name="ScrollState-kotlin.Int-"></a><a name="scrollstate"></a> |
| <h3 class="api-name" id="ScrollState(kotlin.Int)">ScrollState</h3> |
| <pre class="api-signature no-pretty-print"><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#ScrollState(kotlin.Int)">ScrollState</a>(initial: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</pre> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%">Parameters</th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code>initial: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td> |
| <td> |
| <p>value of the scroll</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <h2>Public functions</h2> |
| <div><a name="animateScrollTo(kotlin.Int, androidx.compose.animation.core.AnimationSpec)"></a><a name="animateScrollTo-kotlin.Int-androidx.compose.animation.core.AnimationSpec-"></a><a name="animatescrollto"></a> |
| <h3 class="api-name" id="animateScrollTo(kotlin.Int,androidx.compose.animation.core.AnimationSpec)">animateScrollTo</h3> |
| <pre class="api-signature no-pretty-print">suspend fun <a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#animateScrollTo(kotlin.Int,androidx.compose.animation.core.AnimationSpec)">animateScrollTo</a>(<br> value: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br> animationSpec: <a href="/reference/kotlin/androidx/compose/animation/core/AnimationSpec.html">AnimationSpec</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>> = SpringSpec()<br>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre> |
| <p>Scroll to position in pixels with animation.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%">Parameters</th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code>value: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td> |
| <td> |
| <p>target value in pixels to smooth scroll to, value will be coerced to 0..maxPosition</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>animationSpec: <a href="/reference/kotlin/androidx/compose/animation/core/AnimationSpec.html">AnimationSpec</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>> = SpringSpec()</code></td> |
| <td> |
| <p>animation curve for smooth scroll animation</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="dispatchRawDelta-kotlin.Float-"></a><a name="dispatchrawdelta"></a> |
| <h3 class="api-name" id="dispatchRawDelta(kotlin.Float)">dispatchRawDelta</h3> |
| <pre class="api-signature no-pretty-print">open fun <a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#dispatchRawDelta(kotlin.Float)">dispatchRawDelta</a>(delta: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a></pre> |
| <p>Dispatch scroll delta in pixels avoiding all scroll related mechanisms.</p> |
| <p><b>NOTE:</b> unlike <code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#scroll(androidx.compose.foundation.MutatePriority,kotlin.coroutines.SuspendFunction1)">scroll</a></code>, dispatching any delta with this method won't trigger nested scroll, won't stop ongoing scroll/drag animation and will bypass scrolling of any priority. This method will also ignore <code>reverseDirection</code> and other parameters set in scrollable.</p> |
| <p>This method is used internally for nested scrolling dispatch and other low level operations, allowing implementers of <code><a href="/reference/kotlin/androidx/compose/foundation/gestures/ScrollableState.html">ScrollableState</a></code> influence the consumption as suits them. Manually dispatching delta via this method will likely result in a bad user experience, you must prefer <code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#scroll(androidx.compose.foundation.MutatePriority,kotlin.coroutines.SuspendFunction1)">scroll</a></code> method over this one.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%">Parameters</th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code>delta: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a></code></td> |
| <td> |
| <p>amount of scroll dispatched in the nested scroll process</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%">Returns</th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a></code></td> |
| <td> |
| <p>the amount of delta consumed</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="scroll(androidx.compose.foundation.MutatePriority, kotlin.coroutines.SuspendFunction1)"></a><a name="scroll-androidx.compose.foundation.MutatePriority-kotlin.coroutines.SuspendFunction1-"></a><a name="scroll"></a> |
| <h3 class="api-name" id="scroll(androidx.compose.foundation.MutatePriority,kotlin.coroutines.SuspendFunction1)">scroll</h3> |
| <pre class="api-signature no-pretty-print">open suspend fun <a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#scroll(androidx.compose.foundation.MutatePriority,kotlin.coroutines.SuspendFunction1)">scroll</a>(scrollPriority: <a href="/reference/kotlin/androidx/compose/foundation/MutatePriority.html">MutatePriority</a>, block: suspend <a href="/reference/kotlin/androidx/compose/foundation/gestures/ScrollScope.html">ScrollScope</a>.() <span style="white-space: nowrap;">-></span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></pre> |
| <p>Call this function to take control of scrolling and gain the ability to send scroll events via <code><a href="/reference/kotlin/androidx/compose/foundation/gestures/ScrollScope.html#scrollBy(kotlin.Float)">ScrollScope.scrollBy</a></code>. All actions that change the logical scroll position must be performed within a <code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#scroll(androidx.compose.foundation.MutatePriority,kotlin.coroutines.SuspendFunction1)">scroll</a></code> block (even if they don't call any other methods on this object) in order to guarantee that mutual exclusion is enforced.</p> |
| <p>If <code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#scroll(androidx.compose.foundation.MutatePriority,kotlin.coroutines.SuspendFunction1)">scroll</a></code> is called from elsewhere with the <code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#scroll(androidx.compose.foundation.MutatePriority,kotlin.coroutines.SuspendFunction1)">scrollPriority</a></code> higher or equal to ongoing scroll, ongoing scroll will be canceled.</p> |
| </div> |
| <div><a name="scrollTo-kotlin.Int-"></a><a name="scrollto"></a> |
| <h3 class="api-name" id="scrollTo(kotlin.Int)">scrollTo</h3> |
| <pre class="api-signature no-pretty-print">suspend fun <a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#scrollTo(kotlin.Int)">scrollTo</a>(value: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a></pre> |
| <p>Instantly jump to the given position in pixels.</p> |
| <p>Cancels the currently running scroll, if any, and suspends until the cancellation is complete.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%">Parameters</th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code>value: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td> |
| <td> |
| <p>number of pixels to scroll by</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%">Returns</th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a></code></td> |
| <td> |
| <p>the amount of scroll consumed</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%">See also</th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#animateScrollTo(kotlin.Int,androidx.compose.animation.core.AnimationSpec)">animateScrollTo</a></code></td> |
| <td> |
| <p>for an animated version</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <h2>Public properties</h2> |
| <div><a name="getInteractionSource()"></a><a name="setInteractionSource()"></a><a name="getInteractionSource--"></a><a name="setInteractionSource--"></a> |
| <h3 class="api-name" id="interactionSource()">interactionSource</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#interactionSource()">interactionSource</a>: <a href="/reference/kotlin/androidx/compose/foundation/interaction/InteractionSource.html">InteractionSource</a></pre> |
| <p><code><a href="/reference/kotlin/androidx/compose/foundation/interaction/InteractionSource.html">InteractionSource</a></code> that will be used to dispatch drag events when this list is being dragged. If you want to know whether the fling (or smooth scroll) is in progress, use <code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#isScrollInProgress()">isScrollInProgress</a></code>.</p> |
| </div> |
| <div><a name="getIsScrollInProgress()"></a><a name="setIsScrollInProgress()"></a><a name="getIsScrollInProgress--"></a><a name="setIsScrollInProgress--"></a> |
| <h3 class="api-name" id="isScrollInProgress()">isScrollInProgress</h3> |
| <pre class="api-signature no-pretty-print">open val <a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#isScrollInProgress()">isScrollInProgress</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a></pre> |
| <p>Whether this <code><a href="/reference/kotlin/androidx/compose/foundation/gestures/ScrollableState.html">ScrollableState</a></code> is currently scrolling by gesture, fling or programmatically or not.</p> |
| </div> |
| <div><a name="getMaxValue()"></a><a name="setMaxValue()"></a><a name="getMaxValue--"></a><a name="setMaxValue--"></a> |
| <h3 class="api-name" id="maxValue()">maxValue</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#maxValue()">maxValue</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre> |
| <p>maximum bound for <code><a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#value()">value</a></code>, or <code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/-m-a-x_-v-a-l-u-e.html">Int.MAX_VALUE</a></code> if still unknown</p> |
| </div> |
| <div><a name="getValue()"></a><a name="setValue()"></a><a name="getValue--"></a><a name="setValue--"></a> |
| <h3 class="api-name" id="value()">value</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/compose/foundation/ScrollState.html#value()">value</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre> |
| <p>current scroll position value in pixels</p> |
| </div> |
| </body> |
| </html> |