| <html devsite="true"> |
| <head> |
| <title>SwipeableDefaults</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>SwipeableDefaults</h1> |
| <p> |
| <pre>object <a href="/reference/kotlin/androidx/compose/material/SwipeableDefaults.html">SwipeableDefaults</a></pre> |
| </p> |
| <hr> |
| <p>Contains useful defaults for <code><a href="/reference/kotlin/androidx/compose/material/package-summary.html#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)">swipeable</a></code> and <code><a href="/reference/kotlin/androidx/compose/material/SwipeableState.html">SwipeableState</a></code>.</p> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="100%"><h3>Constants</h3></th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td width="40%"><code>const <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/material/SwipeableDefaults.html#StandardResistanceFactor()">StandardResistanceFactor</a> = 10.0f</code></div> |
| <p>A standard resistance factor which indicates that the user has run out of things to see.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code>const <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/material/SwipeableDefaults.html#StiffResistanceFactor()">StiffResistanceFactor</a> = 20.0f</code></div> |
| <p>A stiff resistance factor which indicates that swiping isn't available right now.</p> |
| </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><a href="/reference/kotlin/androidx/compose/material/ResistanceConfig.html">ResistanceConfig</a>?</code></td> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/material/SwipeableDefaults.html#resistanceConfig(kotlin.collections.Set,kotlin.Float,kotlin.Float)">resistanceConfig</a>(<br> anchors: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html">Set</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>>,<br> factorAtMin: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>,<br> factorAtMax: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a><br>)</code></div> |
| <p>The default resistance config used by <code><a href="/reference/kotlin/androidx/compose/material/package-summary.html#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)">swipeable</a></code>.</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/animation/core/SpringSpec.html">SpringSpec</a><<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/material/SwipeableDefaults.html#AnimationSpec()">AnimationSpec</a></code></div> |
| <p>The default animation used by <code><a href="/reference/kotlin/androidx/compose/material/SwipeableState.html">SwipeableState</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td width="40%"><code><a href="/reference/kotlin/androidx/compose/ui/unit/Dp.html">Dp</a></code></td> |
| <td> |
| <div><code><a href="/reference/kotlin/androidx/compose/material/SwipeableDefaults.html#VelocityThreshold()">VelocityThreshold</a></code></div> |
| <p>The default velocity threshold (1.8 dp per millisecond) used by <code><a href="/reference/kotlin/androidx/compose/material/package-summary.html#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)">swipeable</a></code>.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Constants</h2> |
| <div><a name="getStandardResistanceFactor()"></a><a name="setStandardResistanceFactor()"></a><a name="getStandardResistanceFactor--"></a><a name="setStandardResistanceFactor--"></a> |
| <h3 class="api-name" id="StandardResistanceFactor()">StandardResistanceFactor</h3> |
| <pre class="api-signature no-pretty-print">const val <a href="/reference/kotlin/androidx/compose/material/SwipeableDefaults.html#StandardResistanceFactor()">StandardResistanceFactor</a> = 10.0f: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a></pre> |
| <p>A standard resistance factor which indicates that the user has run out of things to see.</p> |
| </div> |
| <div><a name="getStiffResistanceFactor()"></a><a name="setStiffResistanceFactor()"></a><a name="getStiffResistanceFactor--"></a><a name="setStiffResistanceFactor--"></a> |
| <h3 class="api-name" id="StiffResistanceFactor()">StiffResistanceFactor</h3> |
| <pre class="api-signature no-pretty-print">const val <a href="/reference/kotlin/androidx/compose/material/SwipeableDefaults.html#StiffResistanceFactor()">StiffResistanceFactor</a> = 20.0f: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a></pre> |
| <p>A stiff resistance factor which indicates that swiping isn't available right now.</p> |
| </div> |
| <h2>Public functions</h2> |
| <div><a name="resistanceConfig(kotlin.collections.Set, kotlin.Float, kotlin.Float)"></a><a name="resistanceConfig-kotlin.collections.Set-kotlin.Float-kotlin.Float-"></a><a name="resistanceconfig"></a> |
| <h3 class="api-name" id="resistanceConfig(kotlin.collections.Set,kotlin.Float,kotlin.Float)">resistanceConfig</h3> |
| <pre class="api-signature no-pretty-print">fun <a href="/reference/kotlin/androidx/compose/material/SwipeableDefaults.html#resistanceConfig(kotlin.collections.Set,kotlin.Float,kotlin.Float)">resistanceConfig</a>(<br> anchors: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-set/index.html">Set</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>>,<br> factorAtMin: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a> = StandardResistanceFactor,<br> factorAtMax: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a> = StandardResistanceFactor<br>): <a href="/reference/kotlin/androidx/compose/material/ResistanceConfig.html">ResistanceConfig</a>?</pre> |
| <p>The default resistance config used by <code><a href="/reference/kotlin/androidx/compose/material/package-summary.html#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)">swipeable</a></code>.</p> |
| <p>This returns <code>null</code> if there is one anchor. If there are at least two anchors, it returns a <code><a href="/reference/kotlin/androidx/compose/material/ResistanceConfig.html">ResistanceConfig</a></code> with the resistance basis equal to the distance between the two bounds.</p> |
| </div> |
| <h2>Public properties</h2> |
| <div><a name="getAnimationSpec()"></a><a name="setAnimationSpec()"></a><a name="getAnimationSpec--"></a><a name="setAnimationSpec--"></a> |
| <h3 class="api-name" id="AnimationSpec()">AnimationSpec</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/compose/material/SwipeableDefaults.html#AnimationSpec()">AnimationSpec</a>: <a href="/reference/kotlin/androidx/compose/animation/core/SpringSpec.html">SpringSpec</a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>></pre> |
| <p>The default animation used by <code><a href="/reference/kotlin/androidx/compose/material/SwipeableState.html">SwipeableState</a></code>.</p> |
| </div> |
| <div><a name="getVelocityThreshold()"></a><a name="setVelocityThreshold()"></a><a name="getVelocityThreshold--"></a><a name="setVelocityThreshold--"></a> |
| <h3 class="api-name" id="VelocityThreshold()">VelocityThreshold</h3> |
| <pre class="api-signature no-pretty-print">val <a href="/reference/kotlin/androidx/compose/material/SwipeableDefaults.html#VelocityThreshold()">VelocityThreshold</a>: <a href="/reference/kotlin/androidx/compose/ui/unit/Dp.html">Dp</a></pre> |
| <p>The default velocity threshold (1.8 dp per millisecond) used by <code><a href="/reference/kotlin/androidx/compose/material/package-summary.html#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)">swipeable</a></code>.</p> |
| </div> |
| </body> |
| </html> |