{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

FocusEventModifier

@<Error class: unknown class>
public interface FocusEventModifier extends Modifier.Element


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

Summary

Public methods

abstract void

A callback that is called whenever the focus system raises events.

Inherited methods

From androidx.compose.ui.Modifier
default @NonNull Modifier

Concatenates this modifier with another.

From androidx.compose.ui.Modifier.Element
default boolean
all(
    @NonNull Function1<@NonNull Modifier.Element, @NonNull Boolean> predicate
)

Returns true if predicate returns true for all Elements in this Modifier or if this Modifier contains no Elements.

default boolean
any(
    @NonNull Function1<@NonNull Modifier.Element, @NonNull Boolean> predicate
)

Returns true if predicate returns true for any Element in this Modifier.

default @NonNull R
<R extends Object> foldIn(
    @NonNull R initial,
    @NonNull Function2<@NonNull R, @NonNull Modifier.Element, @NonNull R> operation
)

Accumulates a value starting with initial and applying operation to the current value and each element from outside in.

default @NonNull R
<R extends Object> foldOut(
    @NonNull R initial,
    @NonNull Function2<@NonNull Modifier.Element, @NonNull R, @NonNull R> operation
)

Accumulates a value starting with initial and applying operation to the current value and each element from inside out.

Public methods

onFocusEvent

abstract void onFocusEvent(@NonNull FocusState focusState)

A callback that is called whenever the focus system raises events.