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

MutatePriority

public enum MutatePriority extends Enum

java.lang.Object
   ↳ kotlin.Enum
     ↳ androidx.compose.foundation.MutatePriority

Priorities for performing mutation on state.

MutatePriority values follow the natural ordering of enum class values; a value that compares as > to another has a higher priority. A mutation of equal or greater priority will interrupt the current mutation in progress.

Summary

Enum Values

Default

The default priority for mutations.

PreventUserInput

A high-priority mutation that can only be interrupted by other PreventUserInput priority operations.

UserInput

An elevated priority for mutations meant for implementing direct user interactions.

Public methods

final @NonNull EnumEntries<@NonNull MutatePriority>

Priorities for performing mutation on state.

final @NonNull MutatePriority

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

final @NonNull MutatePriority[]

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

Enum Values

Default

MutatePriority MutatePriority.Default

The default priority for mutations. Can be interrupted by other Default, UserInput or PreventUserInput priority operations. Default priority should be used for programmatic animations or changes that should not interrupt user input.

PreventUserInput

MutatePriority MutatePriority.PreventUserInput

A high-priority mutation that can only be interrupted by other PreventUserInput priority operations. PreventUserInput priority should be used for operations that user input should not be able to interrupt.

UserInput

MutatePriority MutatePriority.UserInput

An elevated priority for mutations meant for implementing direct user interactions. Can be interrupted by other UserInput or PreventUserInput priority operations.

Public methods

getEntries

public final @NonNull EnumEntries<@NonNull MutatePrioritygetEntries()

Priorities for performing mutation on state.

MutatePriority values follow the natural ordering of enum class values; a value that compares as > to another has a higher priority. A mutation of equal or greater priority will interrupt the current mutation in progress.

valueOf

public final @NonNull MutatePriority 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 MutatePriority[] 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.