-
- All Implemented Interfaces:
-
com.facebook.react.uimanager.ReactShadowNode
,com.facebook.yoga.YogaMeasureFunction
public class ReactTextInputShadowNode extends ReactBaseTextShadowNode implements YogaMeasureFunction
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
PROP_TEXT
public final static String
PROP_PLACEHOLDER
public final static String
PROP_SELECTION
-
Constructor Summary
Constructors Constructor Description ReactTextInputShadowNode(ReactTextViewManagerCallback reactTextViewManagerCallback)
ReactTextInputShadowNode()
-
Method Summary
Modifier and Type Method Description void
setThemedContext(ThemedReactContext themedContext)
long
measure(YogaNode node, float width, YogaMeasureMode widthMode, float height, YogaMeasureMode heightMode)
Return a value created by YogaMeasureOutput. boolean
isVirtualAnchor()
Nodes that return {@code true}
will be treated as a root view for the virtual nodes tree.boolean
isYogaLeafNode()
Nodes that return {@code true}
will not manage (and and remove) child Yoga nodes.void
setLocalData(Object data)
void
setMostRecentEventCount(int mostRecentEventCount)
void
setText(@Nullable() String text)
String
getText()
void
setPlaceholder(@Nullable() String placeholder)
String
getPlaceholder()
void
setSelection(@Nullable() ReadableMap selection)
void
setTextBreakStrategy(@Nullable() String textBreakStrategy)
void
onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue)
Called after layout step at the end of the UI batch from UIManagerModule. void
setPadding(int spacingType, float padding)
-
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, 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, calculateLayoutOnChildren, 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, hoistNativeChildren, indexOf, indexOfNativeChild, isDescendantOf, isDirty, isLayoutOnly, isMeasureDefined, isVirtual, markLayoutSeen, markUpdateSeen, markUpdated, onAfterUpdateTransaction, onBeforeLayout, removeAllNativeChildren, removeAndDisposeAllChildren, removeChildAt, removeNativeChildAt, setAlignContent, setAlignItems, setAlignSelf, setBaselineFunction, setBorder, setDefaultPadding, setDisplay, setFlexBasis, setFlexBasisAuto, setFlexBasisPercent, setFlexDirection, setFlexWrap, setIsLayoutOnly, setJustifyContent, setLayoutDirection, setLayoutParent, setMargin, setMarginAuto, setMarginPercent, setMeasureFunction, setMeasureSpecs, setOverflow, setPaddingPercent, setPosition, setPositionPercent, setPositionType, setReactTag, setRootTag, setStyleAspectRatio, setStyleHeight, setStyleHeightAuto, setStyleHeightPercent, setStyleMaxHeight, setStyleMaxHeightPercent, setStyleMaxWidth, setStyleMaxWidthPercent, setStyleMinHeight, setStyleMinHeightPercent, setStyleMinWidth, setStyleMinWidthPercent, setStyleWidth, setStyleWidthAuto, setStyleWidthPercent, 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
-
ReactTextInputShadowNode
ReactTextInputShadowNode(ReactTextViewManagerCallback reactTextViewManagerCallback)
-
ReactTextInputShadowNode
ReactTextInputShadowNode()
-
-
Method Detail
-
setThemedContext
void setThemedContext(ThemedReactContext themedContext)
-
measure
long measure(YogaNode node, float width, YogaMeasureMode widthMode, float height, YogaMeasureMode heightMode)
Return a value created by YogaMeasureOutput.make(width, height);
-
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.
-
isYogaLeafNode
boolean isYogaLeafNode()
Nodes that return
{@code true}
will not manage (and and remove) child Yoga nodes. For example ReactTextInputShadowNode or ReactTextShadowNode have child nodes, which do notwant Yoga to lay out, so in the eyes of Yoga it is a leaf node. Override this method insubclass to enforce this requirement.
-
setLocalData
void setLocalData(Object data)
-
setMostRecentEventCount
void setMostRecentEventCount(int mostRecentEventCount)
-
setPlaceholder
void setPlaceholder(@Nullable() String placeholder)
-
getPlaceholder
@Nullable() String getPlaceholder()
-
setSelection
void setSelection(@Nullable() ReadableMap selection)
-
setTextBreakStrategy
void setTextBreakStrategy(@Nullable() String textBreakStrategy)
-
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
-
setPadding
void setPadding(int spacingType, float padding)
-
-
-
-