RichText

class RichText(text: CharSequence, textStyle: TextStyle? = null, style: Style = Style, touchableSpanListener: TouchableSpanListener? = null, clickableSpanListener: ClickableSpanListener? = null, usePerformantTruncation: Boolean = RenderCoreConfig.usePerformantTruncation, useTruncationCaching: Boolean = RenderCoreConfig.useTruncationCaching, dynamicTextColor: DynamicValue<Int?>? = null, clickableSpanAccessibilityProvider: ClickableSpanAccessibilityProvider? = null, useResolvedLayoutDirection: Boolean = false, useLegacyTextCustomEllipsisOffsetFix: Boolean = false) : PrimitiveComponent

Parameters

useLegacyTextCustomEllipsisOffsetFix

With performant truncation, cut a custom ellipsis at the offset Paint.getOffsetForAdvance returns instead of one character before it, like legacy Text with enableFixForTextEllipsisOffset, stepping back while it doesn't fit. Off by default so existing RichText users keep their current truncation behavior.

useResolvedLayoutDirection

Resolve text direction and LAYOUT_START/LAYOUT_END from this component's Litho (Yoga) layout direction instead of the locale, matching Litho's legacy Text. Off by default so existing RichText users keep their locale-based behaviour; see com.facebook.rendercore.text.RichTextPrimitive for why.

Constructors

Link copied to clipboard
constructor(text: CharSequence, textStyle: TextStyle? = null, style: Style = Style, touchableSpanListener: TouchableSpanListener? = null, clickableSpanListener: ClickableSpanListener? = null, usePerformantTruncation: Boolean = RenderCoreConfig.usePerformantTruncation, useTruncationCaching: Boolean = RenderCoreConfig.useTruncationCaching, dynamicTextColor: DynamicValue<Int?>? = null, clickableSpanAccessibilityProvider: ClickableSpanAccessibilityProvider? = null, useResolvedLayoutDirection: Boolean = false, useLegacyTextCustomEllipsisOffsetFix: Boolean = false)

Functions

Link copied to clipboard
Link copied to clipboard
operator override fun equals(@Nullable other: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun getSimpleName(): String
Link copied to clipboard
fun getTypeId(): Int
Link copied to clipboard
override fun hashCode(): Int
Link copied to clipboard
override fun isEquivalentTo(other: Component?): Boolean
Link copied to clipboard
override fun makeShallowCopy(): Component
Link copied to clipboard
fun measure(p0: ComponentContext, p1: Int, p2: Int, p3: Size)
fun measure(p0: ComponentContext, p1: Int, p2: Int, p3: Size, p4: Boolean)
Link copied to clipboard
Link copied to clipboard
open override fun resolveDeferred(calculationContext: CalculationContext, componentContext: ComponentContext, parentContext: ComponentContext): ComponentResolveResult
Link copied to clipboard
Link copied to clipboard
open override fun <T : Any> setDebugAttributeKey(attributeKey: AttributeKey<T>, value: T & Any)
Link copied to clipboard
override fun toString(): String