| <html devsite="true"> |
| <head> |
| <title>DragInteractionKt</title> |
| {% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <h1>DragInteractionKt</h1> |
| <p> |
| <pre>public final class DragInteractionKt</pre> |
| </p> |
| <hr> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Public methods</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td width="40%"><code>static final @<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/runtime/State.html">State</a><@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Boolean.html">Boolean</a>></code></td> |
| <td> |
| <div><code><a href="/reference/androidx/compose/foundation/interaction/DragInteractionKt.html">DragInteractionKt</a>.<a href="/reference/androidx/compose/foundation/interaction/DragInteractionKt.html#(androidx.compose.foundation.interaction.InteractionSource).collectIsDraggedAsState()">collectIsDraggedAsState</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/interaction/InteractionSource.html">InteractionSource</a> receiver<br>)</code></div> |
| <p>Subscribes to this <code><a href="/reference/androidx/compose/foundation/interaction/MutableInteractionSource.html">MutableInteractionSource</a></code> and returns a <code><a href="/reference/androidx/compose/runtime/State.html">State</a></code> representing whether this component is dragged or not.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Public methods</h2> |
| <div><a name="-androidx.compose.foundation.interaction.InteractionSource-.collectIsDraggedAsState--"></a><a name="collectisdraggedasstate"></a> |
| <h3 class="api-name" id="(androidx.compose.foundation.interaction.InteractionSource).collectIsDraggedAsState()">DragInteractionKt.collectIsDraggedAsState</h3> |
| <pre class="api-signature no-pretty-print">@<a href="/reference/androidx/compose/runtime/Composable.html">Composable</a><br>public static final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/runtime/State.html">State</a><@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Boolean.html">Boolean</a>> <a href="/reference/androidx/compose/foundation/interaction/DragInteractionKt.html">DragInteractionKt</a>.<a href="/reference/androidx/compose/foundation/interaction/DragInteractionKt.html#(androidx.compose.foundation.interaction.InteractionSource).collectIsDraggedAsState()">collectIsDraggedAsState</a>(<br> @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/foundation/interaction/InteractionSource.html">InteractionSource</a> receiver<br>)</pre> |
| <p>Subscribes to this <code><a href="/reference/androidx/compose/foundation/interaction/MutableInteractionSource.html">MutableInteractionSource</a></code> and returns a <code><a href="/reference/androidx/compose/runtime/State.html">State</a></code> representing whether this component is dragged or not.</p> |
| <p><code><a href="/reference/androidx/compose/foundation/interaction/DragInteraction.html">DragInteraction</a></code> is typically set by interactions such as <code><a href="/reference/androidx/compose/foundation/gestures/package-summary.html#(Modifier).draggable(androidx.compose.foundation.gestures.DraggableState,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Boolean,kotlin.coroutines.SuspendFunction2,kotlin.coroutines.SuspendFunction2,kotlin.Boolean)">androidx.compose.foundation.gestures.draggable</a></code> and <code><a href="/reference/androidx/compose/foundation/gestures/package-summary.html#(Modifier).scrollable(androidx.compose.foundation.gestures.ScrollableState,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.gestures.FlingBehavior,androidx.compose.foundation.interaction.MutableInteractionSource)">androidx.compose.foundation.gestures.scrollable</a></code>, and higher level components such as <code><a href="/reference/androidx/compose/foundation/lazy/package-summary.html#LazyRow(Modifier,androidx.compose.foundation.lazy.LazyListState,androidx.compose.foundation.layout.PaddingValues,kotlin.Boolean,androidx.compose.foundation.layout.Arrangement.Horizontal,AlignmentVertical,androidx.compose.foundation.gestures.FlingBehavior,kotlin.Function1)">androidx.compose.foundation.lazy.LazyRow</a></code>, available through <code><a href="/reference/androidx/compose/foundation/lazy/LazyListState.html#interactionSource()">androidx.compose.foundation.lazy.LazyListState.interactionSource</a></code>.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Returns</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td width="40%"><code>@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/compose/runtime/State.html">State</a><@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/Boolean.html">Boolean</a>></code></td> |
| <td> |
| <p><code><a href="/reference/androidx/compose/runtime/State.html">State</a></code> representing whether this component is being dragged or not</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| </body> |
| </html> |