public class ReactTextInputShadowNode extends ReactBaseTextShadowNode implements YogaMeasureFunction
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_PLACEHOLDER |
static java.lang.String |
PROP_SELECTION |
static java.lang.String |
PROP_TEXT |
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 |
---|
ReactTextInputShadowNode() |
ReactTextInputShadowNode(ReactTextViewManagerCallback reactTextViewManagerCallback) |
Modifier and Type | Method and Description |
---|---|
protected android.widget.EditText |
createInternalEditText()
May be overriden by subclasses that would like to provide their own instance of the internal
EditText this class uses to determine the expected size of the view. |
java.lang.String |
getPlaceholder() |
java.lang.String |
getText() |
boolean |
isVirtualAnchor()
Nodes that return
true will be treated as a root view for the virtual nodes tree. |
boolean |
isYogaLeafNode()
Nodes that return
true will not manage (and and remove) child Yoga nodes. |
long |
measure(YogaNode node,
float width,
YogaMeasureMode widthMode,
float height,
YogaMeasureMode heightMode)
Return a value created by YogaMeasureOutput.make(width, height);
|
void |
onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue)
Called after layout step at the end of the UI batch from
UIManagerModule . |
void |
setLocalData(java.lang.Object data) |
void |
setMostRecentEventCount(int mostRecentEventCount) |
void |
setPadding(int spacingType,
float padding) |
void |
setPlaceholder(java.lang.String placeholder) |
void |
setSelection(ReadableMap selection) |
void |
setText(java.lang.String text) |
void |
setTextBreakStrategy(java.lang.String textBreakStrategy) |
void |
setThemedContext(ThemedReactContext themedContext) |
setAdjustFontSizeToFit, setAllowFontScaling, setBackgroundColor, setColor, setFontFamily, setFontSize, setFontStyle, setFontVariant, setFontWeight, setIncludeFontPadding, setLetterSpacing, setLineHeight, setMaxFontSizeMultiplier, setMinimumFontScale, setNumberOfLines, setTextAlign, 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, calculateLayoutOnChildren, 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, hoistNativeChildren, indexOf, indexOfNativeChild, isDescendantOf, isDirty, isLayoutOnly, isMeasureDefined, isVirtual, markLayoutSeen, markUpdated, markUpdateSeen, 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
public static final java.lang.String PROP_TEXT
public static final java.lang.String PROP_PLACEHOLDER
public static final java.lang.String PROP_SELECTION
public ReactTextInputShadowNode(ReactTextViewManagerCallback reactTextViewManagerCallback)
public ReactTextInputShadowNode()
public void setThemedContext(ThemedReactContext themedContext)
setThemedContext
in interface ReactShadowNode<ReactShadowNodeImpl>
setThemedContext
in class ReactShadowNodeImpl
public long measure(YogaNode node, float width, YogaMeasureMode widthMode, float height, YogaMeasureMode heightMode)
YogaMeasureFunction
measure
in interface YogaMeasureFunction
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 isYogaLeafNode()
ReactShadowNodeImpl
true
will not manage (and and remove) child Yoga nodes. For example
ReactTextInputShadowNode
or ReactTextShadowNode
have child nodes, which do not
want Yoga to lay out, so in the eyes of Yoga it is a leaf node. Override this method in
subclass to enforce this requirement.isYogaLeafNode
in interface ReactShadowNode<ReactShadowNodeImpl>
isYogaLeafNode
in class ReactShadowNodeImpl
public void setLocalData(java.lang.Object data)
setLocalData
in interface ReactShadowNode<ReactShadowNodeImpl>
setLocalData
in class ReactShadowNodeImpl
public void setMostRecentEventCount(int mostRecentEventCount)
public void setText(java.lang.String text)
public java.lang.String getText()
public void setPlaceholder(java.lang.String placeholder)
public java.lang.String getPlaceholder()
public void setSelection(ReadableMap selection)
public void setTextBreakStrategy(java.lang.String textBreakStrategy)
setTextBreakStrategy
in class ReactBaseTextShadowNode
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 setPadding(int spacingType, float padding)
setPadding
in interface ReactShadowNode<ReactShadowNodeImpl>
setPadding
in class ReactShadowNodeImpl
protected android.widget.EditText createInternalEditText()
EditText
this class uses to determine the expected size of the view.