Placeholder
-
Cmn
class 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.
| Throws | |
|---|---|
kotlin.IllegalArgumentException |
if |
Summary
Public constructors |
|
|---|---|
Placeholder( |
Cmn
|
Public functions |
||
|---|---|---|
Placeholder |
copy( |
Cmn
|
open operator Boolean |
Cmn
|
|
open Int |
hashCode() |
Cmn
|
open String |
toString() |
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. |
height: TextUnit |
the height of the placeholder, it must be specified in sp or em. |
placeholderVerticalAlign: PlaceholderVerticalAlign |
the vertical alignment of the placeholder within the text line. Check |
Public functions
copy
fun copy(
width: TextUnit = this.width,
height: TextUnit = this.height,
placeholderVerticalAlign: PlaceholderVerticalAlign = this.placeholderVerticalAlign
): Placeholder
Public properties
height
val height: TextUnit
the height of the placeholder, it must be specified in sp or em. TextUnit.Unspecified is not allowed.
placeholderVerticalAlign
val placeholderVerticalAlign: PlaceholderVerticalAlign
the vertical alignment of the placeholder within the text line. Check PlaceholderVerticalAlign for more information.
width
val width: TextUnit
the width of the placeholder, it must be specified in sp or em. TextUnit.Unspecified is not allowed.