public class ReactTextShadowNode extends ReactBaseTextShadowNode
ReactBaseTextShadowNode
concrete class for anchor Text
node.
The class measures text in <Text>
view and feeds native TextView
using Spannable
object constructed in superclass.
DEFAULT_TEXT_SHADOW_COLOR, mAdjustsFontSizeToFit, mBackgroundColor, mColor, mContainsImages, mFontFamily, mFontFeatureSettings, mFontStyle, mFontWeight, mHyphenationFrequency, mIncludeFontPadding, mInlineViews, mIsBackgroundColorSet, mIsColorSet, mIsLineThroughTextDecorationSet, mIsUnderlineTextDecorationSet, mJustificationMode, mMinimumFontScale, mNumberOfLines, mReactTextViewManagerCallback, mTextAlign, mTextAttributes, mTextBreakStrategy, mTextShadowColor, mTextShadowOffsetDx, mTextShadowOffsetDy, mTextShadowRadius, PROP_SHADOW_COLOR, PROP_SHADOW_OFFSET, PROP_SHADOW_OFFSET_HEIGHT, PROP_SHADOW_OFFSET_WIDTH, PROP_SHADOW_RADIUS, PROP_TEXT_TRANSFORM, UNSET
Constructor and Description |
---|
ReactTextShadowNode() |
ReactTextShadowNode(ReactTextViewManagerCallback reactTextViewManagerCallback) |
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<? extends ReactShadowNode> |
calculateLayoutOnChildren() |
boolean |
hoistNativeChildren()
When constructing the native tree, nodes that return
true will be treated as leaves. |
boolean |
isVirtualAnchor()
Nodes that return
true will be treated as a root view for the virtual nodes tree. |
void |
markUpdated() |
void |
onBeforeLayout(NativeViewHierarchyOptimizer nativeViewHierarchyOptimizer)
This method will be called by
UIManagerModule once per batch, before calculating
layout. |
void |
onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue)
Called after layout step at the end of the UI batch from
UIManagerModule . |
void |
setShouldNotifyOnTextLayout(boolean shouldNotifyOnTextLayout) |
setAdjustFontSizeToFit, setAllowFontScaling, setBackgroundColor, setColor, setFontFamily, setFontSize, setFontStyle, setFontVariant, setFontWeight, setIncludeFontPadding, setLetterSpacing, setLineHeight, setMaxFontSizeMultiplier, setMinimumFontScale, setNumberOfLines, setTextAlign, setTextBreakStrategy, setTextDecorationLine, setTextShadowColor, setTextShadowOffset, setTextShadowRadius, setTextTransform, spannedFromShadowNode
setAlignContent, setAlignItems, setAlignSelf, setAspectRatio, setBorderWidths, setCollapsable, setDisplay, setFlex, setFlexBasis, setFlexDirection, setFlexGrow, setFlexShrink, setFlexWrap, setHeight, setJustifyContent, setMargins, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPaddings, setPosition, setPositionValues, setShouldNotifyOnLayout, setWidth
addChildAt, addNativeChildAt, calculateLayout, calculateLayout, dirty, dispatchUpdates, dispose, getChildAt, getChildCount, getHeightMeasureSpec, getHierarchyInfo, getLayoutDirection, getLayoutHeight, getLayoutParent, getLayoutWidth, getLayoutX, getLayoutY, getNativeChildCount, getNativeKind, getNativeOffsetForChild, getNativeParent, getPadding, getParent, getReactTag, getRootTag, getScreenHeight, getScreenWidth, getScreenX, getScreenY, getStyleHeight, getStylePadding, getStyleWidth, getThemedContext, getTotalNativeChildren, getViewClass, getWidthMeasureSpec, hasNewLayout, hasUnseenUpdates, hasUpdates, indexOf, indexOfNativeChild, isDescendantOf, isDirty, isLayoutOnly, isMeasureDefined, isVirtual, isYogaLeafNode, markLayoutSeen, markUpdateSeen, onAfterUpdateTransaction, removeAllNativeChildren, removeAndDisposeAllChildren, removeChildAt, removeNativeChildAt, setAlignContent, setAlignItems, setAlignSelf, setBaselineFunction, setBorder, setDefaultPadding, setDisplay, setFlexBasis, setFlexBasisAuto, setFlexBasisPercent, setFlexDirection, setFlexWrap, setIsLayoutOnly, setJustifyContent, setLayoutDirection, setLayoutParent, setLocalData, setMargin, setMarginAuto, setMarginPercent, setMeasureFunction, setMeasureSpecs, 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 ReactTextShadowNode()
public ReactTextShadowNode(ReactTextViewManagerCallback reactTextViewManagerCallback)
public void onBeforeLayout(NativeViewHierarchyOptimizer nativeViewHierarchyOptimizer)
ReactShadowNodeImpl
UIManagerModule
once per batch, before calculating
layout. Will be only called for nodes that are marked as updated with ReactShadowNodeImpl.markUpdated()
or
require layouting (marked with ReactShadowNodeImpl.dirty()
).onBeforeLayout
in interface ReactShadowNode<ReactShadowNodeImpl>
onBeforeLayout
in class ReactShadowNodeImpl
public boolean isVirtualAnchor()
ReactShadowNodeImpl
true
will be treated as a root view for the virtual nodes tree. It
means that all of its descendants will be "virtual" nodes. Good example is InputText
view that may have children Text
nodes but this whole hierarchy will be mapped to a
single android EditText
view.isVirtualAnchor
in interface ReactShadowNode<ReactShadowNodeImpl>
isVirtualAnchor
in class ReactShadowNodeImpl
public boolean hoistNativeChildren()
ReactShadowNodeImpl
true
will be treated as leaves.
Instead of adding this view's native children as subviews of it, they will be added as subviews
of an ancestor. In other words, this view wants to support native children but it cannot host
them itself (e.g. it isn't a ViewGroup).hoistNativeChildren
in interface ReactShadowNode<ReactShadowNodeImpl>
hoistNativeChildren
in class ReactShadowNodeImpl
public void markUpdated()
markUpdated
in interface ReactShadowNode<ReactShadowNodeImpl>
markUpdated
in class ReactShadowNodeImpl
public void onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue)
ReactShadowNodeImpl
UIManagerModule
. May be used
to enqueue additional ui operations for the native view. Will only be called on nodes marked as
updated either with ReactShadowNodeImpl.dirty()
or ReactShadowNodeImpl.markUpdated()
.onCollectExtraUpdates
in interface ReactShadowNode<ReactShadowNodeImpl>
onCollectExtraUpdates
in class ReactShadowNodeImpl
uiViewOperationQueue
- interface for enqueueing UI operationspublic void setShouldNotifyOnTextLayout(boolean shouldNotifyOnTextLayout)
public java.lang.Iterable<? extends ReactShadowNode> calculateLayoutOnChildren()
calculateLayoutOnChildren
in interface ReactShadowNode<ReactShadowNodeImpl>
calculateLayoutOnChildren
in class ReactShadowNodeImpl