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

LayoutDirection

public enum LayoutDirection extends Enum

java.lang.Object
   ↳ kotlin.Enum
     ↳ androidx.compose.ui.unit.LayoutDirection

A class for defining layout directions.

A layout direction can be left-to-right (LTR) or right-to-left (RTL).

Summary

Enum Values

Ltr

Horizontal layout direction is from Left to Right.

Rtl

Horizontal layout direction is from Right to Left.

Public methods

final @NonNull EnumEntries<@NonNull LayoutDirection>

A class for defining layout directions.

final @NonNull LayoutDirection

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

final @NonNull LayoutDirection[]

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

Enum Values

Ltr

LayoutDirection LayoutDirection.Ltr

Horizontal layout direction is from Left to Right.

Rtl

LayoutDirection LayoutDirection.Rtl

Horizontal layout direction is from Right to Left.

Public methods

getEntries

public final @NonNull EnumEntries<@NonNull LayoutDirectiongetEntries()

A class for defining layout directions.

A layout direction can be left-to-right (LTR) or right-to-left (RTL).

valueOf

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