TextDecoration
@Immutable class TextDecoration
kotlin.Any | |
↳ | androidx.compose.ui.text.style.TextDecoration |
Defines a horizontal line to be drawn on the text.
Summary
Public methods | |
---|---|
operator Boolean |
contains(other: TextDecoration) Check whether this TextDecoration contains the given decoration. |
operator Boolean | |
Int |
hashCode() |
operator TextDecoration |
plus(decoration: TextDecoration) Creates a decoration that includes both of the TextDecorations. |
String |
toString() |
Companion functions | |
---|---|
TextDecoration |
combine(decorations: List<TextDecoration>) Creates a decoration that includes all the given decorations. |
Properties | |
---|---|
Int |
Companion properties | |
---|---|
TextDecoration |
Draws a horizontal line over the text. |
TextDecoration | |
TextDecoration |
Draws a horizontal line below the text. |
Public methods
contains
operator fun contains(other: TextDecoration): Boolean
Check whether this TextDecoration contains the given decoration.
Parameters | |
---|---|
other: TextDecoration | The TextDecoration to be checked. |
hashCode
fun hashCode(): Int
plus
operator fun plus(decoration: TextDecoration): TextDecoration
Creates a decoration that includes both of the TextDecorations.
import androidx.compose.material.Text Text( text = "Demo Text", textDecoration = TextDecoration.Underline + TextDecoration.LineThrough )
toString
fun toString(): String
Properties
mask
val mask: Int
Companion functions
combine
fun combine(decorations: List<TextDecoration>): TextDecoration
Creates a decoration that includes all the given decorations.
import androidx.compose.material.Text Text( text = "Demo Text", textDecoration = TextDecoration.Underline + TextDecoration.LineThrough )
Parameters | |
---|---|
decorations: List<TextDecoration> | The decorations to be added |
Companion properties
LineThrough
@Stable val LineThrough: TextDecoration
Draws a horizontal line over the text.
import androidx.compose.material.Text Text( text = "Demo Text", textDecoration = TextDecoration.LineThrough )
None
@Stable val None: TextDecoration
Underline
@Stable val Underline: TextDecoration
Draws a horizontal line below the text.
import androidx.compose.material.Text Text( text = "Demo Text", textDecoration = TextDecoration.Underline )