The Android Developer Challenge is back! Submit your idea before December 2.

RichText

open class RichText : VersionedParcelable
kotlin.Any
   ↳ androidx.car.cluster.navigation.RichText

A RichText is an immutable sequence of graphic elements (e.g.: text, images) to be displayed one after another.

Elements in this sequence are represented by RichTextElement instances.

Each sequence will have a textual representation provided by getText() and in the case of the absence of a rich representation, the sequence of elements getElements() may be left empty. The textual representation may also be used as a fallback for when RichTextElements fail to render.

Summary

Nested classes

Builder for creating a RichText

Public methods

open Boolean
equals(other: Any?)

open MutableList<RichTextElement!>

Returns the sequence of graphic elements.

open String

Returns the plaintext string of this RichText.

open Int

open String

Public methods

equals

open fun equals(other: Any?): Boolean

getElements

@NonNull open fun getElements(): MutableList<RichTextElement!>

Returns the sequence of graphic elements.

If no rich representation is available, the list may be empty and getText() should be used as a fallback.

getText

@NonNull open fun getText(): String

Returns the plaintext string of this RichText.

hashCode

open fun hashCode(): Int

toString

open fun toString(): String