-
- All Implemented Interfaces:
-
com.facebook.react.uimanager.ReactShadowNode
public class ReactTextShadowNode extends ReactBaseTextShadowNode
ReactBaseTextShadowNode concrete class for anchor
{@code Text}
node.The class measures text in
{@code }
view and feeds native TextView using{@code * Spannable}
object constructed in superclass.
-
-
Constructor Summary
Constructors Constructor Description ReactTextShadowNode()
ReactTextShadowNode(ReactTextViewManagerCallback reactTextViewManagerCallback)
-
Method Summary
Modifier and Type Method Description void
onBeforeLayout(NativeViewHierarchyOptimizer nativeViewHierarchyOptimizer)
This method will be called by UIManagerModule once per batch, before calculatinglayout. boolean
isVirtualAnchor()
Nodes that return {@code true}
will be treated as a root view for the virtual nodes tree.boolean
hoistNativeChildren()
When constructing the native tree, nodes that return {@code true}
will be treated as leaves.Instead of adding this view's native children as subviews of it, they will be added as subviewsof an ancestor.void
markUpdated()
void
onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue)
Called after layout step at the end of the UI batch from UIManagerModule. void
setShouldNotifyOnTextLayout(boolean shouldNotifyOnTextLayout)
Iterable<out ReactShadowNode>
calculateLayoutOnChildren()
-
Methods inherited from class com.facebook.react.views.text.ReactBaseTextShadowNode
setAdjustFontSizeToFit, setAllowFontScaling, setBackgroundColor, setColor, setFontFamily, setFontSize, setFontStyle, setFontVariant, setFontWeight, setIncludeFontPadding, setIsAccessibilityLink, setLetterSpacing, setLineHeight, setMaxFontSizeMultiplier, setMinimumFontScale, setNumberOfLines, setTextAlign, setTextBreakStrategy, setTextDecorationLine, setTextShadowColor, setTextShadowOffset, setTextShadowRadius, setTextTransform
-
Methods inherited from class com.facebook.react.uimanager.LayoutShadowNode
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, setShouldNotifyPointerEnter, setShouldNotifyPointerLeave, setShouldNotifyPointerMove, setWidth
-
Methods inherited from class com.facebook.react.uimanager.ReactShadowNodeImpl
addChildAt, addNativeChildAt, calculateLayout, calculateLayout, dirty, dispatchUpdates, dispose, getChildAt, getChildCount, getFlex, 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
-
Methods inherited from class com.facebook.react.uimanager.ReactShadowNode
addChildAt, addNativeChildAt, dispatchUpdates, getChildAt, getLayoutParent, getNativeOffsetForChild, getNativeParent, getParent, indexOf, indexOfNativeChild, isDescendantOf, removeChildAt, removeNativeChildAt, setLayoutParent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ReactTextShadowNode
ReactTextShadowNode()
-
ReactTextShadowNode
ReactTextShadowNode(ReactTextViewManagerCallback reactTextViewManagerCallback)
-
-
Method Detail
-
onBeforeLayout
void onBeforeLayout(NativeViewHierarchyOptimizer nativeViewHierarchyOptimizer)
This method will be called by UIManagerModule once per batch, before calculatinglayout. Will be only called for nodes that are marked as updated with markUpdated orrequire layouting (marked with dirty).
-
isVirtualAnchor
boolean isVirtualAnchor()
Nodes that return
{@code true}
will be treated as a root view for the virtual nodes tree. Itmeans that all of its descendants will be "virtual" nodes. Good example is{@code InputText}
view that may have children{@code Text}
nodes but this whole hierarchy will be mapped to asingle android EditText view.
-
hoistNativeChildren
boolean hoistNativeChildren()
When constructing the native tree, nodes that return
{@code true}
will be treated as leaves.Instead of adding this view's native children as subviews of it, they will be added as subviewsof an ancestor. In other words, this view wants to support native children but it cannot hostthem itself (e.g. it isn't a ViewGroup).
-
markUpdated
void markUpdated()
-
onCollectExtraUpdates
void onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue)
Called after layout step at the end of the UI batch from UIManagerModule. May be usedto enqueue additional ui operations for the native view. Will only be called on nodes marked asupdated either with dirty or markUpdated.
- Parameters:
uiViewOperationQueue
- interface for enqueueing UI operations
-
setShouldNotifyOnTextLayout
void setShouldNotifyOnTextLayout(boolean shouldNotifyOnTextLayout)
-
calculateLayoutOnChildren
Iterable<out ReactShadowNode> calculateLayoutOnChildren()
-
-
-
-