TextLayoutInput

data class TextLayoutInput
kotlin.Any
   ↳ androidx.compose.ui.text.TextLayoutInput

The data class which holds the set of parameters of the text layout computation.

Summary

Public constructors
<init>(text: AnnotatedString, style: TextStyle, placeholders: List<AnnotatedString.Range<Placeholder>>, maxLines: Int, softWrap: Boolean, overflow: TextOverflow, density: Density, layoutDirection: LayoutDirection, resourceLoader: Font.ResourceLoader, constraints: Constraints)

The data class which holds the set of parameters of the text layout computation.

Properties
Constraints

The minimum width provided while calculating this text layout.

Density

The density param used for computing this text layout.

LayoutDirection

The layout direction used for computing this text layout.

Int

The maxLines param used for computing this text layout.

TextOverflow

The overflow param used for computing this text layout

List<AnnotatedString.Range<Placeholder>>

A list of Placeholders inserted into text layout that reserves space to embed icons or custom emojis.

Font.ResourceLoader

The font resource loader used for computing this text layout.

Boolean

The maxLines param used for computing this text layout.

TextStyle

The text layout used for computing this text layout.

AnnotatedString

The text used for computing text layout.

Public constructors

<init>

TextLayoutInput(
    text: AnnotatedString,
    style: TextStyle,
    placeholders: List<AnnotatedString.Range<Placeholder>>,
    maxLines: Int,
    softWrap: Boolean,
    overflow: TextOverflow,
    density: Density,
    layoutDirection: LayoutDirection,
    resourceLoader: Font.ResourceLoader,
    constraints: Constraints)

The data class which holds the set of parameters of the text layout computation.

Properties

constraints

val constraints: Constraints

The minimum width provided while calculating this text layout.

density

val density: Density

The density param used for computing this text layout.

layoutDirection

val layoutDirection: LayoutDirection

The layout direction used for computing this text layout.

maxLines

val maxLines: Int

The maxLines param used for computing this text layout.

overflow

val overflow: TextOverflow

The overflow param used for computing this text layout

placeholders

val placeholders: List<AnnotatedString.Range<Placeholder>>

A list of Placeholders inserted into text layout that reserves space to embed icons or custom emojis. A list of bounding boxes will be returned in TextLayoutResult.placeholderRects that corresponds to this input.

resourceLoader

val resourceLoader: Font.ResourceLoader

The font resource loader used for computing this text layout.

softWrap

val softWrap: Boolean

The maxLines param used for computing this text layout.

style

val style: TextStyle

The text layout used for computing this text layout.

text

val text: AnnotatedString

The text used for computing text layout.