androidx.compose.foundation.text
InlineTextContent
Class · from org.jetbrains.compose.foundation:foundation:1.12.2
No hand-written docs yet.
A data class that stores a composable to be inserted into the text layout.
class InlineTextContent(
placeholder: Placeholder,
children: @Composable (String) -> Unit,
)
How to get one
Create it
InlineTextContent(placeholder, children)constructor
Properties
placeholder
val placeholder: Placeholder
The setting object that defines the size and vertical alignment of this composable in the text line. This is different from the measure of Layout
children
val children: @Composable (String) -> Unit
The composable to be inserted into the text layout. The string parameter passed to it will the alternateText given to appendInlineContent.
Library docs
A data class that stores a composable to be inserted into the text layout.
Different from a regular composable, a Placeholder is also needed for text layout to reserve
space. In this placeholder, the size of the content and how it will be aligned within the text
line is defined. When the children composable is measured, its size given in Placeholder.width
and Placeholder.height will be converted into androidx.compose.ui.unit.Constraints and passed
through androidx.compose.ui.layout.Layout.