TextLinkStyles


Represents the styles of the links in the AnnotatedString in different states

These style objects will be applied to every LinkAnnotation annotation present in the AnnotatedString, overriding any styling that might be already present in the AnnotatedString at the LinkAnnotation's position.

If null is passed to the style argument, it means that a LinkAnnotation representing a link will not get a specific link styling for this state. Instead it will be styled according to the rest of the AnnotatedString.

The resulting style of the link is always a combination of all styles merged into one in the order style.merge(focusedStyle).merge(hoveredStyle).merge(pressedStyle).

Summary

Public constructors

TextLinkStyles(
    style: SpanStyle?,
    focusedStyle: SpanStyle?,
    hoveredStyle: SpanStyle?,
    pressedStyle: SpanStyle?
)
Cmn

Public functions

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

Public properties

SpanStyle?

style configuration for a link applied on top of the style when the link is focused

Cmn
SpanStyle?

style configuration for a link applied on top of the style when the link is hovered

Cmn
SpanStyle?

style configuration for a link applied on top of the style when the link is pressed

Cmn
SpanStyle?

style configuration for a link that is always applied

Cmn

Public constructors

TextLinkStyles

TextLinkStyles(
    style: SpanStyle? = null,
    focusedStyle: SpanStyle? = null,
    hoveredStyle: SpanStyle? = null,
    pressedStyle: SpanStyle? = null
)
Parameters
style: SpanStyle? = null

style configuration for a link that is always applied

focusedStyle: SpanStyle? = null

style configuration for a link applied on top of the style when the link is focused

hoveredStyle: SpanStyle? = null

style configuration for a link applied on top of the style when the link is hovered

pressedStyle: SpanStyle? = null

style configuration for a link applied on top of the style when the link is pressed

Public functions

equals

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

hashCode

open fun hashCode(): Int

Public properties

focusedStyle

val focusedStyleSpanStyle?

style configuration for a link applied on top of the style when the link is focused

hoveredStyle

val hoveredStyleSpanStyle?

style configuration for a link applied on top of the style when the link is hovered

pressedStyle

val pressedStyleSpanStyle?

style configuration for a link applied on top of the style when the link is pressed

style

val styleSpanStyle?

style configuration for a link that is always applied