TextDirection


Defines the algorithm to be used while determining the text direction.

Summary

Public companion functions

TextDirection
valueOf(value: Int)

Creates a TextDirection from the given integer value.

Cmn

Public companion properties

TextDirection

This value indicates that the text direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm.

Cmn
TextDirection

This value indicates that the text direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm.

Cmn
TextDirection

This value indicates that the text direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm.

Cmn
TextDirection

Always sets the text direction to be Left to Right.

Cmn
TextDirection

Always sets the text direction to be Right to Left.

Cmn
TextDirection

This represents an unset value, a usual replacement for "null" when a primitive value is desired.

Cmn

Public functions

open String
Cmn

Public properties

Boolean

Returns true if this baseline shift is not TextDirection.Unspecified.

Cmn
Int
Cmn

Public companion functions

valueOf

fun valueOf(value: Int): TextDirection

Creates a TextDirection from the given integer value. This can be useful if you need to serialize/deserialize TextDirection values.

Parameters
value: Int

The integer representation of the TextDirection.

See also
value

Public companion properties

Content

val ContentTextDirection

This value indicates that the text direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm. If no strong directional character is present, then androidx.compose.ui.unit.LayoutDirection is used to resolve the final TextDirection.

ContentOrLtr

val ContentOrLtrTextDirection

This value indicates that the text direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm. If no strong directional character is present, then Left to Right will be used as the default direction.

ContentOrRtl

val ContentOrRtlTextDirection

This value indicates that the text direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm. If no strong directional character is present, then Right to Left will be used as the default direction.

Ltr

val LtrTextDirection

Always sets the text direction to be Left to Right.

Rtl

val RtlTextDirection

Always sets the text direction to be Right to Left.

Unspecified

val UnspecifiedTextDirection

This represents an unset value, a usual replacement for "null" when a primitive value is desired.

Public functions

toString

open fun toString(): String

Public properties

isSpecified

val isSpecifiedBoolean

Returns true if this baseline shift is not TextDirection.Unspecified.

See also
Unspecified

value

val valueInt