Package-level declarations

Types

Link copied to clipboard
annotation class ExperimentalWildApi

Annotation marker that the Api is currently experimental and likely to change or potentially removed.

Link copied to clipboard

Captures the current state of an interactive element.

Link copied to clipboard
Link copied to clipboard

Receiver scope for requestInitialFocus.

Properties

Link copied to clipboard

Local to expose interaction capabilities of the current platform.

Functions

Link copied to clipboard
fun Modifier.clickable(enabled: Boolean = true, interactionSource: MutableInteractionSource? = null, indication: Indication? = null, role: Role? = null, onLongClick: () -> Unit? = null, onClick: () -> Unit): Modifier

Interop Modifier.clickable to apply the correct clickable modifier based on the requirement for hardware input. For example if a Tv device is detected it adds support for hardware clicks from remote controls.

Link copied to clipboard
fun Modifier.hardwareClickable(enabled: Boolean = true, interactionSource: MutableInteractionSource, role: Role? = null, onLongClick: () -> Unit? = null, indication: Indication? = null, onClick: () -> Unit?): Modifier

Modifier to set up handling of click events using hardware input such as a Tv remote control.

Link copied to clipboard
fun Modifier.hardwareSelectable(selected: Boolean, enabled: Boolean = true, interactionSource: MutableInteractionSource, role: Role? = null, onLongClick: () -> Unit? = null, indication: Indication? = null, onClick: () -> Unit?): Modifier

Modifier to set up handling of selecting events using hardware input such as a Tv remote control.

Link copied to clipboard
fun Modifier.interactable(enabled: Boolean = true, selected: Boolean? = null, interactionSource: MutableInteractionSource? = null, indication: Indication? = null, role: Role? = null, onLongClick: () -> Unit? = null, onClick: () -> Unit): Modifier

Interop Modifier to support either Modifier.selectable or Modifier.clickable, applying the correct modifier based on the requirement for hardware input. For example if a Tv device is detected it adds support for hardware clicks from remote controls.

Link copied to clipboard
fun Modifier.requestInitialFocus(enabled: Boolean = true, onRequestFocus: suspend RequestFocusModifierScope.() -> Any?? = null): Modifier

Utility Modifier to request focus on initial layout. This Modifier calls to onRequestFocus when onGloballyPositioned is set, caching the fact it has been positioned to make sure any request to onRequestFocus is only called once after positioning.

Link copied to clipboard
fun Modifier.restoreChildFocus(onRestoreFailed: () -> FocusRequester? = null): Modifier

Utility Modifier to restore focus of a child within a focus group. A common use case is to restore the last focus child when navigating from a nested LazyRow within a LazyColumn.

Link copied to clipboard
fun Modifier.selectable(selected: Boolean, enabled: Boolean = true, interactionSource: MutableInteractionSource? = null, indication: Indication? = null, role: Role? = null, onLongClick: () -> Unit? = null, onClick: () -> Unit): Modifier

Interop Modifier.selectable to apply the correct selectable modifier based on the requirement for hardware input. For example if a Tv device is detected it adds support for hardware clicks from remote controls.