AnnotatedString

data class AnnotatedString
kotlin.Any
   ↳ androidx.ui.text.AnnotatedString

The basic data structure of text with multiple styles. To construct an AnnotatedString you can use Builder.

Summary

Nested classes

Builder class for AnnotatedString.

data

The information attached on the text such as a TextStyle.

Public constructors

<init>(text: String, textStyles: List<AnnotatedString.Item<TextStyle>> = listOf(), paragraphStyles: List<AnnotatedString.Item<ParagraphStyle>> = listOf())

The basic data structure of text with multiple styles.

Public methods

operator AnnotatedString

Extension functions

From androidx.ui.text
AnnotatedString
AnnotatedString.capitalize(localeList: LocaleList = LocaleList.current)

Create capitalized AnnotatedString

AnnotatedString
AnnotatedString.decapitalize(localeList: LocaleList = LocaleList.current)

Create capitalized AnnotatedString

AnnotatedString

Return a substring for the AnnotatedString and include the styles in the range of start (inclusive) and end (exclusive).

AnnotatedString
AnnotatedString.toLowerCase(localeList: LocaleList = LocaleList.current)

Create lower case transformed AnnotatedString

AnnotatedString
AnnotatedString.toUpperCase(localeList: LocaleList = LocaleList.current)

Create upper case transformed AnnotatedString

Properties

List<AnnotatedString.Item<ParagraphStyle>>

String

List<AnnotatedString.Item<TextStyle>>

Extension properties

From androidx.ui.text
Int

Returns the length of the AnnotatedString.

Public constructors

<init>

AnnotatedString(
    text: String,
    textStyles: List<AnnotatedString.Item<TextStyle>> = listOf(),
    paragraphStyles: List<AnnotatedString.Item<ParagraphStyle>> = listOf())

The basic data structure of text with multiple styles. To construct an AnnotatedString you can use Builder.

Public methods

plus

operator fun plus(other: AnnotatedString): AnnotatedString

Properties

paragraphStyles

val paragraphStyles: List<AnnotatedString.Item<ParagraphStyle>>

text

val text: String

textStyles

val textStyles: List<AnnotatedString.Item<TextStyle>>