Placeholder

Class
Common
class Placeholder(
    val width: TextUnit,
    val height: TextUnit,
    val placeholderVerticalAlign: PlaceholderVerticalAlign,
)

A placeholder is a rectangle box inserted into text, which tells the text processor to leave an empty space. It is typically used to insert inline image, custom emoji, etc into the text paragraph.

Parameters

width the width of the placeholder, it must be specified in sp or em. TextUnit.Unspecified is not allowed.
height the height of the placeholder, it must be specified in sp or em. TextUnit.Unspecified is not allowed.
placeholderVerticalAlign the vertical alignment of the placeholder within the text line. Check PlaceholderVerticalAlign for more information.

Functions

fun copy(
        width: TextUnit = this.width,
        height: TextUnit = this.height,
        placeholderVerticalAlign: PlaceholderVerticalAlign = this.placeholderVerticalAlign,
    ): Placeholder