TextDirection
-
Cmn
value class TextDirection
Defines the algorithm to be used while determining the text direction.
| See also | |
|---|---|
ResolvedTextDirection |
Summary
Public companion functions |
||
|---|---|---|
TextDirection |
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
|
Extension functions |
||
|---|---|---|
inline TextDirection |
TextDirection.takeOrElse(block: () -> TextDirection)If |
Cmn
|
Extension properties |
||
|---|---|---|
Boolean |
Returns |
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. |
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if the given |
| See also | |
|---|---|
value |
Public companion properties
Content
val Content: TextDirection
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.
-
if used while creating a Paragraph object,
androidx.compose.ui.text.intl.LocaleListwill be used to resolve the direction as a fallback instead ofandroidx.compose.ui.unit.LayoutDirection.
ContentOrLtr
val ContentOrLtr: TextDirection
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 ContentOrRtl: TextDirection
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.
Unspecified
val Unspecified: TextDirection
This represents an unset value, a usual replacement for "null" when a primitive value is desired.
Extension functions
takeOrElse
inline fun TextDirection.takeOrElse(block: () -> TextDirection): TextDirection
If isSpecified is true then this is returned, otherwise block is executed and its result is returned.
Extension properties
isSpecified
val TextDirection.isSpecified: Boolean
Returns true if this TextDirection is not TextDirection.Unspecified.
| See also | |
|---|---|
Unspecified |