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

ToggleableState

public enum ToggleableState extends Enum

java.lang.Object
   ↳ kotlin.Enum
     ↳ androidx.compose.ui.state.ToggleableState

Enum that represents possible toggleable states.

Summary

Enum Values

Indeterminate

State that means that on/off value of a component cannot be determined

Off

State that means a component is off

On

State that means a component is on

Public methods

final @NonNull EnumEntries<@NonNull ToggleableState>

Enum that represents possible toggleable states.

final @NonNull ToggleableState

Returns the enum constant of this type with the specified name.

final @NonNull ToggleableState[]

Returns an array containing the constants of this enum type, in the order they're declared.

Enum Values

Indeterminate

ToggleableState ToggleableState.Indeterminate

State that means that on/off value of a component cannot be determined

Off

ToggleableState ToggleableState.Off

State that means a component is off

On

ToggleableState ToggleableState.On

State that means a component is on

Public methods

getEntries

public final @NonNull EnumEntries<@NonNull ToggleableStategetEntries()

Enum that represents possible toggleable states.

valueOf

public final @NonNull ToggleableState valueOf(@NonNull String value)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

public final @NonNull ToggleableState[] values()

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.