Package-level declarations

Types

Link copied to clipboard

A MetricAffectingSpan that allows to set the letter spacing on the selected text span.

Link copied to clipboard

Implements a LineHeightSpan which follows web-like behavior for line height, unlike LineHeightSpan.Standard which only effects space between the baselines of adjacent line boxes (does not impact space before the first line or after the last).

Link copied to clipboard
class CustomStyleSpan(privateStyle: Int, privateWeight: Int, val fontFeatureSettings: String?, val fontFamily: String?, assetManager: AssetManager) : MetricAffectingSpan, ReactSpan

A MetricAffectingSpan that allows to change the style of the displayed font. CustomStyleSpan will try to load the fontFamily with the right style and weight from the assets. The custom fonts will have to be located in the res/assets folder of the application. The supported custom fonts extensions are .ttf and .otf. For each font family the bold, italic and bold_italic variants are supported. Given a "family" font family the files in the assets/fonts folder need to be family.ttf(.otf) family_bold.ttf(.otf) family_italic.ttf(.otf) and family_bold_italic.ttf(.otf). If the right font is not found in the assets folder CustomStyleSpan will fallback on the most appropriate default typeface depending on the style. Fonts are retrieved and cached using the ReactFontManager

Link copied to clipboard

This class is used in TextLayoutManager to linkify and style a span of text with accessibilityRole="link". This is needed to make nested Text components accessible.

Link copied to clipboard

Multiplies foreground and background alpha channels by given opacity

Link copied to clipboard
interface ReactSpan

Enables us to distinguish between spans that were added by React Native and spans that were added by something else. All spans that React Native adds should implement this interface.

Link copied to clipboard
class ReactTagSpan(val reactTag: Int) : ReactSpan

Instances of this class are used to place reactTag information of nested text react nodes into spannable text rendered by single TextView

Link copied to clipboard
data class ReactTextPaintHolderSpan(val textPaint: TextPaint) : ReactSpan

Associates a TextPaint instance with a Spannable for convenience

Link copied to clipboard
class SetSpanOperation(start: Int, end: Int, val what: ReactSpan)
Link copied to clipboard
class ShadowStyleSpan(dx: Float, dy: Float, radius: Float, val color: Int) : CharacterStyle, ReactSpan
Link copied to clipboard

Base class for inline image spans.

Link copied to clipboard
class TextInlineViewPlaceholderSpan(val reactTag: Int, val width: Int, val height: Int) : ReplacementSpan, ReactSpan

TextInlineViewPlaceholderSpan is a span for inlined views that are inside . It computes its size based on the input size. It contains no draw logic, just positioning logic.