TextSelectionColors
@Immutable class TextSelectionColors
kotlin.Any | |
↳ | androidx.compose.ui.selection.TextSelectionColors |
Represents the colors used for text selection by text and text field components.
See AmbientTextSelectionColors to provide new values for this throughout the hierarchy.
Summary
Public constructors | |
---|---|
Represents the colors used for text selection by text and text field components. |
Public methods | |
---|---|
Boolean | |
Int |
hashCode() |
String |
toString() |
Properties | |
---|---|
Color |
the color used to draw the background behind the selected region. |
Color |
the color used for the selection handles on either side of the selection region. |
Public constructors
<init>
TextSelectionColors(
handleColor: Color,
backgroundColor: Color)
Represents the colors used for text selection by text and text field components.
See AmbientTextSelectionColors to provide new values for this throughout the hierarchy.
Public methods
hashCode
fun hashCode(): Int
toString
fun toString(): String
Properties
backgroundColor
val backgroundColor: Color
the color used to draw the background behind the selected region. This color should have alpha applied to keep the text legible - this alpha is typically 0.4f (40%) but this may need to be reduced in order to meet contrast requirements depending on the color used for text, selection background, and the background behind the selection background.
handleColor
val handleColor: Color
the color used for the selection handles on either side of the selection region.