Google is committed to advancing racial equity for Black communities. See how.

FocusState

enum class FocusState
kotlin.Any
   ↳ kotlin.Enum<androidx.compose.ui.focus.FocusState>
   ↳ androidx.compose.ui.focus.FocusState

Different states of the focus system. These are the states used by the Focus Nodes.

Summary

Enum values

The focusable component is currently active (i.

One of the descendants of the focusable component is Active.

The focusable component is currently active (has focus), and is in a state where it does not want to give up focus.

The focusable component is not currently focusable.

The focusable component does not receive any key events.

Extension properties
From androidx.compose.ui.focus
Boolean

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

Enum values

Active

enum val Active : FocusState

The focusable component is currently active (i.e. it receives key events).

ActiveParent

enum val ActiveParent : FocusState

One of the descendants of the focusable component is Active.

Captured

enum val Captured : FocusState

The focusable component is currently active (has focus), and is in a state where it does not want to give up focus. (Eg. a text field with an invalid phone number).

Disabled

enum val Disabled : FocusState

The focusable component is not currently focusable. (eg. A disabled button).

Inactive

enum val Inactive : FocusState

The focusable component does not receive any key events. (ie it is not active, nor are any of its descendants active).