androidx.compose.ui.text.style

Classes

BaselineShift

The amount by which the text is shifted up or down from current the baseline.

Cmn
Hyphens

Automatic hyphenation configuration.

Cmn
LineBreak

When soft wrap is enabled and the width of the text exceeds the width of its container, line breaks are inserted in the text to split it over multiple lines.

Cmn
android
LineBreak.Strategy

The strategy used for line breaking.

android
LineBreak.Strictness

Describes the strictness of line breaking, determining before which characters line breaks can be inserted.

android
LineBreak.WordBreak

Describes how line breaks should be inserted within words.

android
LineHeightStyle

The configuration for line height such as alignment of the line in the provided line height, whether to apply additional space as a result of line height to top of first line top and bottom of last line.

Cmn
LineHeightStyle.Alignment

Defines how to align the line in the space provided by the line height.

Cmn
LineHeightStyle.Mode

Defines if the specified line height value should be enforced.

Cmn
LineHeightStyle.Trim

Defines whether the space that would be added to the top of first line, and bottom of the last line should be trimmed or not.

Cmn
TextAlign

Defines how to align text horizontally.

Cmn
TextDecoration

Defines a horizontal line to be drawn on the text.

Cmn
TextDirection

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

Cmn
TextGeometricTransform

Define a geometric transformation on text.

Cmn
TextIndent

Specify the indentation of a paragraph.

Cmn
TextMotion

Defines ways to render and place glyphs to provide readability and smooth animations for text.

Cmn
android
TextOverflow

How overflowing text should be handled.

Cmn

Enums

ResolvedTextDirection

Describes the directionality of a text.

Cmn

Top-level functions summary

BaselineShift
lerp(start: BaselineShift, stop: BaselineShift, fraction: Float)

Linearly interpolate two BaselineShifts.

Cmn
TextGeometricTransform
lerp(
    start: TextGeometricTransform,
    stop: TextGeometricTransform,
    fraction: Float
)
Cmn
TextIndent
lerp(start: TextIndent, stop: TextIndent, fraction: Float)

Linearly interpolate between two TextIndents.

Cmn

Top-level functions

fun lerp(start: BaselineShift, stop: BaselineShift, fraction: Float): BaselineShift

Linearly interpolate two BaselineShifts.

lerp

fun lerp(
    start: TextGeometricTransform,
    stop: TextGeometricTransform,
    fraction: Float
): TextGeometricTransform

lerp

fun lerp(start: TextIndent, stop: TextIndent, fraction: Float): TextIndent

Linearly interpolate between two TextIndents.

The fraction argument represents position on the timeline, with 0.0 meaning that the interpolation has not started, returning start (or something equivalent to start), 1.0 meaning that the interpolation has finished, returning stop (or something equivalent to stop), and values in between meaning that the interpolation is at the relevant point on the timeline between start and stop. The interpolation can be extrapolated beyond 0.0 and 1.0, so negative values and values greater than 1.0 are valid.