public abstract class ReactBaseTextShadowNode extends LayoutShadowNode
ReactShadowNode
abstract class for spannable text nodes.
This class handles all text attributes assosiated with <Text>
-ish node. A concrete
node can be an anchor <Text>
node, an anchor <TextInput>
node or virtual <Text>
node inside <Text>
or <TextInput>
node. Or even something else.
This also node calculates Spannable
object based on subnodes of the same type, which
can be used in concrete classes to feed native views and compute layout.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TEXT_SHADOW_COLOR |
protected int |
mBackgroundColor |
protected int |
mColor |
protected boolean |
mContainsImages |
protected java.lang.String |
mFontFamily
NB: If a font family is used that does not have a style in a certain Android version (ie.
|
protected int |
mFontStyle
mFontStyle can be
Typeface.NORMAL or Typeface.ITALIC . |
protected int |
mFontWeight |
protected float |
mHeightOfTallestInlineImage |
protected boolean |
mIncludeFontPadding |
protected boolean |
mIsBackgroundColorSet |
protected boolean |
mIsColorSet |
protected boolean |
mIsLineThroughTextDecorationSet |
protected boolean |
mIsUnderlineTextDecorationSet |
protected int |
mJustificationMode |
protected int |
mNumberOfLines |
protected int |
mTextAlign |
protected TextAttributes |
mTextAttributes |
protected int |
mTextBreakStrategy |
protected int |
mTextShadowColor |
protected float |
mTextShadowOffsetDx |
protected float |
mTextShadowOffsetDy |
protected float |
mTextShadowRadius |
protected TextTransform |
mTextTransform |
static java.lang.String |
PROP_SHADOW_COLOR |
static java.lang.String |
PROP_SHADOW_OFFSET |
static java.lang.String |
PROP_SHADOW_OFFSET_HEIGHT |
static java.lang.String |
PROP_SHADOW_OFFSET_WIDTH |
static java.lang.String |
PROP_SHADOW_RADIUS |
static java.lang.String |
PROP_TEXT_TRANSFORM |
static int |
UNSET |
Constructor and Description |
---|
ReactBaseTextShadowNode() |
Modifier and Type | Method and Description |
---|---|
void |
setAllowFontScaling(boolean allowFontScaling) |
void |
setBackgroundColor(java.lang.Integer color) |
void |
setColor(java.lang.Integer color) |
void |
setFontFamily(java.lang.String fontFamily) |
void |
setFontSize(float fontSize) |
void |
setFontStyle(java.lang.String fontStyleString)
/* This code is duplicated in ReactTextInputManager
/* TODO: Factor into a common place they can both use
|
void |
setFontWeight(java.lang.String fontWeightString)
/* This code is duplicated in ReactTextInputManager
/* TODO: Factor into a common place they can both use
|
void |
setIncludeFontPadding(boolean includepad) |
void |
setLetterSpacing(float letterSpacing) |
void |
setLineHeight(float lineHeight) |
void |
setMaxFontSizeMultiplier(float maxFontSizeMultiplier) |
void |
setNumberOfLines(int numberOfLines) |
void |
setTextAlign(java.lang.String textAlign) |
void |
setTextBreakStrategy(java.lang.String textBreakStrategy) |
void |
setTextDecorationLine(java.lang.String textDecorationLineString) |
void |
setTextShadowColor(int textShadowColor) |
void |
setTextShadowOffset(ReadableMap offsetMap) |
void |
setTextShadowRadius(float textShadowRadius) |
void |
setTextTransform(java.lang.String textTransform) |
protected static android.text.Spannable |
spannedFromShadowNode(ReactBaseTextShadowNode textShadowNode,
java.lang.String text) |
setAlignContent, setAlignItems, setAlignSelf, setAspectRatio, setBorderWidths, setDisplay, setFlex, setFlexBasis, setFlexDirection, setFlexGrow, setFlexShrink, setFlexWrap, setHeight, setJustifyContent, setMargins, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPaddings, setPosition, setPositionValues, setShouldNotifyOnLayout, setWidth
addChildAt, addNativeChildAt, calculateLayout, dirty, dispatchUpdates, dispose, getChildAt, getChildCount, getHierarchyInfo, getLayoutDirection, getLayoutHeight, getLayoutWidth, getLayoutX, getLayoutY, getNativeChildCount, getNativeOffsetForChild, getNativeParent, getPadding, getParent, getReactTag, getRootTag, getScreenHeight, getScreenWidth, getScreenX, getScreenY, getStyleHeight, getStylePadding, getStyleWidth, getThemedContext, getTotalNativeChildren, getViewClass, hasNewLayout, hasUnseenUpdates, hasUpdates, indexOf, indexOfNativeChild, isDescendantOf, isDirty, isLayoutOnly, isMeasureDefined, isVirtual, isVirtualAnchor, isYogaLeafNode, markLayoutSeen, markUpdated, markUpdateSeen, onAfterUpdateTransaction, onBeforeLayout, onCollectExtraUpdates, removeAllNativeChildren, removeAndDisposeAllChildren, removeChildAt, removeNativeChildAt, setAlignContent, setAlignItems, setAlignSelf, setBaselineFunction, setBorder, setDefaultPadding, setDisplay, setFlexBasis, setFlexBasisAuto, setFlexBasisPercent, setFlexDirection, setFlexWrap, setIsLayoutOnly, setJustifyContent, setLayoutDirection, setLocalData, setMargin, setMarginAuto, setMarginPercent, setMeasureFunction, setOverflow, setPadding, setPaddingPercent, setPosition, setPositionPercent, setPositionType, setReactTag, setRootTag, setStyleAspectRatio, setStyleHeight, setStyleHeightAuto, setStyleHeightPercent, setStyleMaxHeight, setStyleMaxHeightPercent, setStyleMaxWidth, setStyleMaxWidthPercent, setStyleMinHeight, setStyleMinHeightPercent, setStyleMinWidth, setStyleMinWidthPercent, setStyleWidth, setStyleWidthAuto, setStyleWidthPercent, setThemedContext, setViewClassName, shouldNotifyOnLayout, toString, updateProperties
public static final int UNSET
public static final java.lang.String PROP_SHADOW_OFFSET
public static final java.lang.String PROP_SHADOW_OFFSET_WIDTH
public static final java.lang.String PROP_SHADOW_OFFSET_HEIGHT
public static final java.lang.String PROP_SHADOW_RADIUS
public static final java.lang.String PROP_SHADOW_COLOR
public static final java.lang.String PROP_TEXT_TRANSFORM
public static final int DEFAULT_TEXT_SHADOW_COLOR
protected TextAttributes mTextAttributes
protected boolean mIsColorSet
protected int mColor
protected boolean mIsBackgroundColorSet
protected int mBackgroundColor
protected int mNumberOfLines
protected int mTextAlign
protected int mTextBreakStrategy
protected int mJustificationMode
protected TextTransform mTextTransform
protected float mTextShadowOffsetDx
protected float mTextShadowOffsetDy
protected float mTextShadowRadius
protected int mTextShadowColor
protected boolean mIsUnderlineTextDecorationSet
protected boolean mIsLineThroughTextDecorationSet
protected boolean mIncludeFontPadding
protected int mFontStyle
Typeface.NORMAL
or Typeface.ITALIC
.
mFontWeight can be Typeface.NORMAL
or Typeface.BOLD
.protected int mFontWeight
protected java.lang.String mFontFamily
protected boolean mContainsImages
protected float mHeightOfTallestInlineImage
protected static android.text.Spannable spannedFromShadowNode(ReactBaseTextShadowNode textShadowNode, java.lang.String text)
public void setNumberOfLines(int numberOfLines)
public void setLineHeight(float lineHeight)
public void setLetterSpacing(float letterSpacing)
public void setAllowFontScaling(boolean allowFontScaling)
public void setMaxFontSizeMultiplier(float maxFontSizeMultiplier)
public void setTextAlign(java.lang.String textAlign)
public void setFontSize(float fontSize)
public void setColor(java.lang.Integer color)
public void setBackgroundColor(java.lang.Integer color)
public void setFontFamily(java.lang.String fontFamily)
public void setFontWeight(java.lang.String fontWeightString)
public void setFontStyle(java.lang.String fontStyleString)
public void setIncludeFontPadding(boolean includepad)
public void setTextDecorationLine(java.lang.String textDecorationLineString)
public void setTextBreakStrategy(java.lang.String textBreakStrategy)
public void setTextShadowOffset(ReadableMap offsetMap)
public void setTextShadowRadius(float textShadowRadius)
public void setTextShadowColor(int textShadowColor)
public void setTextTransform(java.lang.String textTransform)