Google berkomitmen untuk mendorong terwujudnya keadilan rasial bagi komunitas Kulit Hitam. Lihat caranya.

androidx.ui.core.focus

Interfaces

FocusModifier

A Modifier.Element that wraps makes the modifiers on the right into a Focusable.

FocusObserverModifier

A modifier that can be used to observe focus state changes.

FocusRequesterModifier

A modifier that can be used to pass in a FocusRequester that can be used to request focus state changes.

Classes

FocusRequester

The FocusRequester is used in conjunction with Modifier.focusRequester to send requests for focus state change.

Annotations

ExperimentalFocus

Enums

FocusDetailedState

Different states of the focus system.

FocusState

Different states of the focus system.

FocusState2

Different states of the focus system.

Top-level functions summary

FocusModifier

Use this function to create an instance of FocusModifier.

Extension functions summary

For Modifier
Modifier

Add this modifier to a component to make it focusable.

Modifier
Modifier.focusObserver(onFocusChange: (FocusState2) -> Unit)

Add this modifier to a component to observe focus state changes.

Modifier

Add this modifier to a component to observe changes to focus state.

For FocusDetailedState
FocusState

Converts a FocusDetailedState to a FocusState.

Extension properties summary

For FocusModifier
FocusState

This function returns the FocusState for the component wrapped by this FocusModifier.

For FocusState2
Boolean

Converts a focus state into a boolean value indicating if the component is focused or not.

Top-level functions

FocusModifier

@Composable fun FocusModifier(): FocusModifier

Deprecated.

Use this function to create an instance of FocusModifier. Adding a FocusModifier to a Composable makes it focusable.

Extension functions

focus

@Composable fun Modifier.focus(): Modifier

Add this modifier to a component to make it focusable.

focusObserver

fun Modifier.focusObserver(onFocusChange: (FocusState2) -> Unit): Modifier

Add this modifier to a component to observe focus state changes.

focusRequester

fun Modifier.focusRequester(focusRequester: FocusRequester): Modifier

Add this modifier to a component to observe changes to focus state.

focusState

fun FocusDetailedState.focusState(): FocusState

Deprecated.

Converts a FocusDetailedState to a FocusState.

TODO(b/160822875): Deprecate this after the new Modifier.Focus is ready for consumption.

Extension properties

focusState

val FocusModifier.focusState: FocusState

Deprecated.

This function returns the FocusState for the component wrapped by this FocusModifier.

isFocused

val FocusState2.isFocused: Boolean

Converts a focus state into a boolean value indicating if the component is focused or not.

Return
true if the component is focused, false otherwise.