TextDecoration


Defines a horizontal line to be drawn on the text.

Summary

Public companion functions

TextDecoration
combine(decorations: List<TextDecoration>)

Creates a decoration that includes all the given decorations.

Cmn

Public companion properties

TextDecoration

Draws a horizontal line over the text.

Cmn
TextDecoration
Cmn
TextDecoration

Draws a horizontal line below the text.

Cmn

Public functions

operator Boolean

Check whether this TextDecoration contains the given decoration.

Cmn
open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
operator TextDecoration
plus(decoration: TextDecoration)

Creates a decoration that includes both of the TextDecorations.

Cmn
open String
Cmn

Public properties

Int
Cmn

Public companion functions

combine

fun combine(decorations: List<TextDecoration>): TextDecoration

Creates a decoration that includes all the given decorations.

import androidx.compose.material.Text
import androidx.compose.ui.text.style.TextDecoration

Text(text = "Demo Text", textDecoration = TextDecoration.Underline + TextDecoration.LineThrough)
Parameters
decorations: List<TextDecoration>

The decorations to be added

Public companion properties

LineThrough

val LineThroughTextDecoration

Draws a horizontal line over the text.

import androidx.compose.material.Text
import androidx.compose.ui.text.style.TextDecoration

Text(text = "Demo Text", textDecoration = TextDecoration.LineThrough)

None

val NoneTextDecoration

Underline

val UnderlineTextDecoration

Draws a horizontal line below the text.

import androidx.compose.material.Text
import androidx.compose.ui.text.style.TextDecoration

Text(text = "Demo Text", textDecoration = TextDecoration.Underline)

Public functions

contains

operator fun contains(other: TextDecoration): Boolean

Check whether this TextDecoration contains the given decoration.

Parameters
other: TextDecoration

The TextDecoration to be checked.

equals

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

hashCode

open fun hashCode(): Int

plus

operator fun plus(decoration: TextDecoration): TextDecoration

Creates a decoration that includes both of the TextDecorations.

import androidx.compose.material.Text
import androidx.compose.ui.text.style.TextDecoration

Text(text = "Demo Text", textDecoration = TextDecoration.Underline + TextDecoration.LineThrough)

toString

open fun toString(): String

Public properties

mask

val maskInt