The Developer Preview for Android 11 is now available; test it out and share your feedback.

FocusOperator

class FocusOperator
kotlin.Any
   ↳ androidx.ui.focus.FocusOperator

The FocusOperator is returned in the receiver scope of the children of a Focusable. It access to focus APIs pertaining to the Focusable.

Summary

Public constructors

The FocusOperator is returned in the receiver scope of the children of a Focusable.

Public methods

Unit

Request focus for the Focusable associated with this FocusOperator.

Inherited extension functions

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Properties

FocusDetailedState

A more detailed focus state of the Focusable associated with this FocusOperator.

FocusState

The current focus state of the Focusable associated with this FocusOperator.

Public constructors

<init>

FocusOperator()

The FocusOperator is returned in the receiver scope of the children of a Focusable. It access to focus APIs pertaining to the Focusable.

Public methods

requestFocus

fun requestFocus(): Unit

Request focus for the Focusable associated with this FocusOperator.

Properties

focusDetailedState

val focusDetailedState: FocusDetailedState

A more detailed focus state of the Focusable associated with this FocusOperator. For a smaller subset of states, use focusState.

focusState

val focusState: FocusState

The current focus state of the Focusable associated with this FocusOperator. For more detailed focus state information, use focusDetailedState.