The Developer Preview for Android 11 is now available; test it out and share your feedback.

MultiParagraphIntrinsics

class MultiParagraphIntrinsics : ParagraphIntrinsics
kotlin.Any
   ↳ androidx.ui.text.MultiParagraphIntrinsics

Calculates and provides the intrinsic width and height of text that contains ParagraphStyle.

Summary

Public constructors

<init>(annotatedString: AnnotatedString, style: TextStyle, density: Density, resourceLoader: Font.ResourceLoader)

Calculates and provides the intrinsic width and height of text that contains ParagraphStyle.

Inherited extension functions

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Properties

AnnotatedString

the text to be laid out

Float

Returns the smallest width beyond which increasing the width never decreases the height.

Float

The width for text if all soft wrap opportunities were taken.

Public constructors

<init>

MultiParagraphIntrinsics(
    annotatedString: AnnotatedString,
    style: TextStyle,
    density: Density,
    resourceLoader: Font.ResourceLoader)

Calculates and provides the intrinsic width and height of text that contains ParagraphStyle.

Parameters
annotatedString: AnnotatedString the text to be laid out
style: TextStyle the TextStyle to be applied to the whole text
density: Density density of the device
resourceLoader: Font.ResourceLoader Font.ResourceLoader to be used to load the font given in SpanStyles

See Also

Exceptions
IllegalArgumentException if ParagraphStyle.textDirectionAlgorithm is not set

Properties

annotatedString

val annotatedString: AnnotatedString

the text to be laid out

maxIntrinsicWidth

val maxIntrinsicWidth: Float

Returns the smallest width beyond which increasing the width never decreases the height.

minIntrinsicWidth

val minIntrinsicWidth: Float

The width for text if all soft wrap opportunities were taken.