Placeholder


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.

Summary

Public constructors

Placeholder(
    width: TextUnit,
    height: TextUnit,
    placeholderVerticalAlign: PlaceholderVerticalAlign
)
Cmn

Public functions

Placeholder
copy(
    width: TextUnit,
    height: TextUnit,
    placeholderVerticalAlign: PlaceholderVerticalAlign
)
Cmn
open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

TextUnit

the height of the placeholder, it must be specified in sp or em.

Cmn
PlaceholderVerticalAlign

the vertical alignment of the placeholder within the text line.

Cmn
TextUnit

the width of the placeholder, it must be specified in sp or em.

Cmn

Public constructors

Placeholder

Placeholder(
    width: TextUnit,
    height: TextUnit,
    placeholderVerticalAlign: PlaceholderVerticalAlign
)
Parameters
width: TextUnit

the width of the placeholder, it must be specified in sp or em. TextUnit.Unspecified is not allowed.

height: TextUnit

the height of the placeholder, it must be specified in sp or em. TextUnit.Unspecified is not allowed.

placeholderVerticalAlign: PlaceholderVerticalAlign

the vertical alignment of the placeholder within the text line. Check PlaceholderVerticalAlign for more information.

Public functions

copy

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

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

height

val heightTextUnit

the height of the placeholder, it must be specified in sp or em. TextUnit.Unspecified is not allowed.

placeholderVerticalAlign

val placeholderVerticalAlignPlaceholderVerticalAlign

the vertical alignment of the placeholder within the text line. Check PlaceholderVerticalAlign for more information.

width

val widthTextUnit

the width of the placeholder, it must be specified in sp or em. TextUnit.Unspecified is not allowed.