StyledStringBuilder

actual class StyledStringBuilder

Builder for creating a StyledString

Parameters

string

the String to style

defaultTextStyle

The KalugaTextStyle to apply when no StringStyleAttribute are set for a given range. This may be partially overwritten (e.g. StringStyleAttribute.CharacterStyleAttribute.ForegroundColor may overwrite KalugaTextStyle.color)

linkStyle

The LinkStyle to apply when StringStyleAttribute.Link is applied. When null the Theme default will be used

context

the Context in which the StyledString will be displayed

expect class StyledStringBuilder

Builder for creating a StyledString

actual class StyledStringBuilder

Builder for creating a StyledString

Parameters

string

the String to style

defaultTextStyle

The KalugaTextStyle to apply when no StringStyleAttribute are set for a given range. This may be partially overwritten (e.g. StringStyleAttribute.CharacterStyleAttribute.ForegroundColor may overwrite KalugaTextStyle.color)

linkStyle

The LinkStyle to apply when StringStyleAttribute.Link is applied. When null the Theme default will be used

actual class StyledStringBuilder

Builder for creating a StyledString

Parameters

string

the String to style

defaultTextStyle

The KalugaTextStyle to apply when no StringStyleAttribute are set for a given range. This may be partially overwritten (e.g. StringStyleAttribute.CharacterStyleAttribute.ForegroundColor may overwrite KalugaTextStyle.color)

linkStyle

The LinkStyle to apply when StringStyleAttribute.Link is applied. When null the Theme default will be used

actual class StyledStringBuilder

Builder for creating a StyledString

Parameters

string

the String to style

defaultTextStyle

The KalugaTextStyle to apply when no StringStyleAttribute are set for a given range. This may be partially overwritten (e.g. StringStyleAttribute.CharacterStyleAttribute.ForegroundColor may overwrite KalugaTextStyle.color)

linkStyle

The LinkStyle to apply when StringStyleAttribute.Link is applied. When null the Theme default will be used

Constructors

Link copied to clipboard
constructor(string: String, defaultTextStyle: KalugaTextStyle, linkStyle: LinkStyle?, context: Context)
constructor(string: String, defaultTextStyle: <Error class: unknown class>, linkStyle: <Error class: unknown class>?)
constructor(string: String, defaultTextStyle: KalugaTextStyle, linkStyle: LinkStyle?)
constructor(string: String, defaultTextStyle: KalugaTextStyle, linkStyle: LinkStyle?)

Types

Link copied to clipboard
actual class Provider

Provider for a StyledStringBuilder

expect class Provider

Provider for a StyledStringBuilder

actual class Provider

Provider for a StyledStringBuilder

actual class Provider

Provider for a StyledStringBuilder

actual class Provider

Provider for a StyledStringBuilder

Functions

Link copied to clipboard
actual fun addStyleAttribute(attribute: StringStyleAttribute, range: IntRange)

Adds a StringStyleAttribute for a given range

expect fun addStyleAttribute(attribute: StringStyleAttribute, range: IntRange)

Adds a StringStyleAttribute for a given range

actual fun addStyleAttribute(attribute: StringStyleAttribute, range: IntRange)

Adds a StringStyleAttribute for a given range

actual fun addStyleAttribute(attribute: StringStyleAttribute, range: IntRange)

Adds a StringStyleAttribute for a given range

Link copied to clipboard
actual fun create(): StyledString

Creates the StyledString

expect fun create(): StyledString

Creates the StyledString

actual fun create(): StyledString

Creates the StyledString

actual fun create(): StyledString

Creates the StyledString

actual fun create(): StyledString

Creates the StyledString