androidx.compose.foundation.interaction

Interfaces

DragInteraction

An interaction related to drag events.

Cmn
FocusInteraction

An interaction related to focus events.

Cmn
HoverInteraction

An interaction related to hover events.

Cmn
Interaction

An Interaction represents transient UI state for a component, typically separate from the actual 'business' state that a component may control.

Cmn
InteractionSource

InteractionSource represents a stream of Interactions corresponding to events emitted by a component.

Cmn
MutableInteractionSource

MutableInteractionSource represents a stream of Interactions corresponding to events emitted by a component.

Cmn
PressInteraction

An interaction related to press events.

Cmn

Classes

DragInteraction.Cancel

An interaction representing the cancellation of a Start event on a component.

Cmn
DragInteraction.Start

An interaction representing a drag event on a component.

Cmn
DragInteraction.Stop

An interaction representing the stopping of a Start event on a component.

Cmn
FocusInteraction.Focus

An interaction representing a focus event on a component.

Cmn
FocusInteraction.Unfocus

An interaction representing a Focus event being released on a component.

Cmn
HoverInteraction.Enter

An interaction representing a hover event on a component.

Cmn
HoverInteraction.Exit

An interaction representing a Enter event being released on a component.

Cmn
PressInteraction.Cancel

An interaction representing the cancellation of a Press event on a component.

Cmn
PressInteraction.Press

An interaction representing a press event on a component.

Cmn
PressInteraction.Release

An interaction representing the release of a Press event on a component.

Cmn

Composables

collectIsDraggedAsState

Subscribes to this MutableInteractionSource and returns a State representing whether this component is dragged or not.

Cmn
collectIsFocusedAsState

Subscribes to this MutableInteractionSource and returns a State representing whether this component is focused or not.

Cmn
collectIsHoveredAsState

Subscribes to this MutableInteractionSource and returns a State representing whether this component is hovered or not.

Cmn
collectIsPressedAsState

Subscribes to this MutableInteractionSource and returns a State representing whether this component is pressed or not.

Cmn

Top-level functions summary

MutableInteractionSource

Return a new MutableInteractionSource that can be hoisted and provided to components, allowing listening to Interaction changes inside those components.

Cmn

Top-level functions

MutableInteractionSource

@RememberInComposition
fun MutableInteractionSource(): MutableInteractionSource

Return a new MutableInteractionSource that can be hoisted and provided to components, allowing listening to Interaction changes inside those components.

This should be remembered before it is provided to components, so it can maintain its state across compositions.