public class RCTTextInput extends LayoutShadowNode implements YogaMeasureFunction
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
PROP_HORIZONTAL |
protected static java.lang.String |
PROP_REMOVE_CLIPPED_SUBVIEWS |
| Constructor and Description |
|---|
RCTTextInput() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChildAt(ReactShadowNode child,
int i) |
boolean |
clipsSubviews() |
boolean |
clipToBounds() |
protected void |
collectState(com.facebook.react.flat.StateBuilder stateBuilder,
float left,
float top,
float right,
float bottom,
float clipLeft,
float clipTop,
float clipRight,
float clipBottom)
Collects DrawCommands produced by this FlatShadowNode.
|
protected int |
getDefaultFontSize() |
protected int |
getFontSize()
Returns font size for this node.
|
protected int |
getFontStyle()
Returns font style for this node.
|
float |
getPadding(int spacingType)
Get the padding for a certain spacingType defined in com.facebook.yoga.Spacing
|
int |
getScreenHeight() |
int |
getScreenWidth() |
int |
getScreenX() |
int |
getScreenY() |
protected com.facebook.react.flat.FontStylingSpan |
getSpan() |
protected void |
invalidate()
Marks root node as updated to trigger a StateBuilder pass to collect DrawCommands for the node
tree.
|
boolean |
isHorizontal() |
boolean |
isPaddingChanged()
Did the padding change
|
boolean |
isVirtual()
Nodes that return
true will be treated as "virtual" nodes. |
boolean |
isVirtualAnchor()
Nodes that return
true will be treated as a root view for the virtual nodes tree. |
void |
markUpdated() |
long |
measure(YogaNode node,
float width,
YogaMeasureMode widthMode,
float height,
YogaMeasureMode heightMode)
Return a value created by YogaMeasureOutput.make(width, height);
|
boolean |
needsCustomLayoutForChildren()
Whether or not custom layout is needed for the children
|
protected void |
notifyChanged(boolean shouldRemeasure)
Propagates changes up to RCTText without dirtying current node.
|
void |
onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue)
Called after layout step at the end of the UI batch from
UIManagerModule. |
protected void |
performApplySpans(android.text.SpannableStringBuilder builder,
int begin,
int end,
boolean isEditable) |
protected void |
performCollectAttachDetachListeners(com.facebook.react.flat.StateBuilder stateBuilder) |
protected void |
performCollectText(android.text.SpannableStringBuilder builder) |
void |
resetPaddingChanged()
Reset the padding changed internal state
|
void |
setBackgroundColor(int backgroundColor) |
void |
setColor(double textColor) |
void |
setFontFamily(java.lang.String fontFamily) |
void |
setFontSize(float fontSizeSp) |
void |
setFontStyle(java.lang.String fontStyleString) |
void |
setFontWeight(java.lang.String fontWeightString) |
void |
setMostRecentEventCount(int mostRecentEventCount) |
protected void |
setNodeRegion(com.facebook.react.flat.NodeRegion nodeRegion) |
void |
setNumberOfLines(int numberOfLines) |
void |
setOverflow(java.lang.String overflow) |
void |
setPadding(int spacingType,
float padding) |
void |
setText(java.lang.String text) |
void |
setTextDecorationLine(java.lang.String textDecorationLineString) |
void |
setTextShadowColor(int textShadowColor) |
void |
setTextShadowOffset(ReadableMap offsetMap) |
void |
setTextShadowRadius(float textShadowRadius) |
void |
setThemedContext(ThemedReactContext themedContext) |
setAlignContent, setAlignItems, setAlignSelf, setAspectRatio, setBorderWidths, setDisplay, setFlex, setFlexBasis, setFlexDirection, setFlexGrow, setFlexShrink, setFlexWrap, setHeight, setJustifyContent, setMargins, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setPaddings, setPosition, setPositionValues, setShouldNotifyOnLayout, setWidthaddNativeChildAt, calculateLayout, dirty, dispose, getChildAt, getChildCount, getLayoutDirection, getLayoutHeight, getLayoutWidth, getLayoutX, getLayoutY, getNativeChildCount, getNativeOffsetForChild, getNativeParent, getPadding, getParent, getReactTag, getRootNode, getStyleHeight, getStylePadding, getStyleWidth, getThemedContext, getTotalNativeChildren, getViewClass, hasNewLayout, hasUnseenUpdates, hasUpdates, indexOf, indexOfNativeChild, isDescendantOf, isDirty, isLayoutOnly, markLayoutSeen, markUpdateSeen, onAfterUpdateTransaction, onBeforeLayout, removeAllNativeChildren, removeAndDisposeAllChildren, removeChildAt, removeNativeChildAt, setAlignContent, setAlignItems, setAlignSelf, setBorder, setDefaultPadding, setDisplay, setFlexBasis, setFlexBasisAuto, setFlexBasisPercent, setFlexDirection, setFlexWrap, setIsLayoutOnly, setJustifyContent, setLayoutDirection, setMargin, setMarginAuto, setMarginPercent, setMeasureFunction, setOverflow, setPaddingPercent, setPosition, setPositionPercent, setPositionType, setReactTag, setStyleAspectRatio, setStyleHeight, setStyleHeightAuto, setStyleHeightPercent, setStyleMaxHeight, setStyleMaxHeightPercent, setStyleMaxWidth, setStyleMaxWidthPercent, setStyleMinHeight, setStyleMinHeightPercent, setStyleMinWidth, setStyleMinWidthPercent, setStyleWidth, setStyleWidthAuto, setStyleWidthPercent, shouldNotifyOnLayout, toString, updatePropertiesprotected static final java.lang.String PROP_REMOVE_CLIPPED_SUBVIEWS
protected static final java.lang.String PROP_HORIZONTAL
protected void notifyChanged(boolean shouldRemeasure)
public void setThemedContext(ThemedReactContext themedContext)
setThemedContext in class ReactShadowNodepublic long measure(YogaNode node, float width, YogaMeasureMode widthMode, float height, YogaMeasureMode heightMode)
YogaMeasureFunctionmeasure in interface YogaMeasureFunctionpublic boolean isVirtual()
ReactShadowNodetrue will be treated as "virtual" nodes. That is, nodes that are not
mapped into native views (e.g. nested text node). By default this method returns false.public boolean isVirtualAnchor()
ReactShadowNodetrue will be treated as a root view for the virtual nodes tree. It
means that NativeViewHierarchyManager will not try to perform manageChildren
operation on such views. 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 class ReactShadowNodepublic void setBackgroundColor(int backgroundColor)
public void onCollectExtraUpdates(UIViewOperationQueue uiViewOperationQueue)
ReactShadowNodeUIManagerModule. May be used
to enqueue additional ui operations for the native view. Will only be called on nodes marked
as updated either with ReactShadowNode.dirty() or ReactShadowNode.markUpdated().onCollectExtraUpdates in class ReactShadowNodeuiViewOperationQueue - interface for enqueueing UI operationspublic void setMostRecentEventCount(int mostRecentEventCount)
public void setNumberOfLines(int numberOfLines)
public void setText(@Nullable
java.lang.String text)
public void setPadding(int spacingType,
float padding)
setPadding in class ReactShadowNodepublic boolean isPaddingChanged()
public void resetPaddingChanged()
protected void performCollectText(android.text.SpannableStringBuilder builder)
public boolean needsCustomLayoutForChildren()
public float getPadding(int spacingType)
public void addChildAt(ReactShadowNode child, int i)
protected void performApplySpans(android.text.SpannableStringBuilder builder,
int begin,
int end,
boolean isEditable)
protected void performCollectAttachDetachListeners(com.facebook.react.flat.StateBuilder stateBuilder)
public void setFontSize(float fontSizeSp)
public void setColor(double textColor)
public void setFontFamily(@Nullable
java.lang.String fontFamily)
public void setFontWeight(@Nullable
java.lang.String fontWeightString)
public void setTextDecorationLine(@Nullable
java.lang.String textDecorationLineString)
public void setFontStyle(@Nullable
java.lang.String fontStyleString)
public void setTextShadowOffset(@Nullable
ReadableMap offsetMap)
public void setTextShadowRadius(float textShadowRadius)
public void setTextShadowColor(int textShadowColor)
protected final int getFontSize()
protected final int getFontStyle()
protected int getDefaultFontSize()
protected final com.facebook.react.flat.FontStylingSpan getSpan()
protected void collectState(com.facebook.react.flat.StateBuilder stateBuilder,
float left,
float top,
float right,
float bottom,
float clipLeft,
float clipTop,
float clipRight,
float clipBottom)
public void setOverflow(java.lang.String overflow)
setOverflow in class LayoutShadowNodepublic final boolean clipToBounds()
public final int getScreenX()
getScreenX in class ReactShadowNodepublic final int getScreenY()
getScreenY in class ReactShadowNodepublic final int getScreenWidth()
getScreenWidth in class ReactShadowNodepublic final int getScreenHeight()
getScreenHeight in class ReactShadowNodeprotected final void invalidate()
public void markUpdated()
markUpdated in class ReactShadowNodeprotected final void setNodeRegion(com.facebook.react.flat.NodeRegion nodeRegion)
public boolean clipsSubviews()
public boolean isHorizontal()