public class ReactTextViewManager extends BaseViewManager<ReactTextView,ReactTextShadowNode>
TextView.
This is a "shadowing" view manager, which means that the NativeViewHierarchyManager will
not manage children of native TextView instances returned by this manager. Instead we useNativeModule.NativeMethod| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REACT_CLASS |
PROP_NATIVE_ID, PROP_TEST_IDMETHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC| Constructor and Description |
|---|
ReactTextViewManager() |
| Modifier and Type | Method and Description |
|---|---|
ReactTextShadowNode |
createShadowNodeInstance()
This method should return a subclass of
ReactShadowNode which will be then used for
measuring position and size of the view. |
ReactTextView |
createViewInstance(ThemedReactContext context)
Subclasses should return a new View instance of the proper type.
|
java.lang.String |
getName() |
java.lang.Class<ReactTextShadowNode> |
getShadowNodeClass()
This method should return
Class instance that represent type of shadow node that this
manager will return from ViewManager.createShadowNodeInstance(). |
protected void |
onAfterUpdateTransaction(ReactTextView view)
Callback that will be triggered after all properties are updated in current update transaction
(all @ReactProp handlers for properties updated in current transaction have been called).
|
void |
setBorderColor(ReactTextView view,
int index,
java.lang.Integer color) |
void |
setBorderRadius(ReactTextView view,
int index,
float borderRadius) |
void |
setBorderStyle(ReactTextView view,
java.lang.String borderStyle) |
void |
setBorderWidth(ReactTextView view,
int index,
float width) |
void |
setDisabled(ReactTextView view,
boolean disabled) |
void |
setEllipsizeMode(ReactTextView view,
java.lang.String ellipsizeMode) |
void |
setIncludeFontPadding(ReactTextView view,
boolean includepad) |
void |
setNumberOfLines(ReactTextView view,
int numberOfLines) |
void |
setSelectable(ReactTextView view,
boolean isSelectable) |
void |
setSelectionColor(ReactTextView view,
java.lang.Integer color) |
void |
setTextAlignVertical(ReactTextView view,
java.lang.String textAlignVertical) |
void |
updateExtraData(ReactTextView view,
java.lang.Object extraData)
Subclasses can implement this method to receive an optional extra data enqueued from the
corresponding instance of
ReactShadowNode in
ReactShadowNode.onCollectExtraUpdates(com.facebook.react.uimanager.UIViewOperationQueue). |
setAccessibilityComponentType, setAccessibilityLabel, setAccessibilityLiveRegion, setBackgroundColor, setElevation, setImportantForAccessibility, setNativeId, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setTestId, setTransform, setTranslateX, setTranslateY, setZIndexaddEventEmitters, createView, getCommandsMap, getExportedCustomBubblingEventTypeConstants, getExportedCustomDirectEventTypeConstants, getExportedViewConstants, getNativeProps, onDropViewInstance, receiveCommand, updatePropertiescanOverrideExistingModule, getConstants, hasConstants, initialize, onCatalystInstanceDestroypublic static final java.lang.String REACT_CLASS
public java.lang.String getName()
getName in interface NativeModulegetName in class ViewManager<ReactTextView,ReactTextShadowNode>public ReactTextView createViewInstance(ThemedReactContext context)
ViewManagercreateViewInstance in class ViewManager<ReactTextView,ReactTextShadowNode>public void setNumberOfLines(ReactTextView view, int numberOfLines)
public void setEllipsizeMode(ReactTextView view, @Nullable java.lang.String ellipsizeMode)
public void setTextAlignVertical(ReactTextView view, @Nullable java.lang.String textAlignVertical)
public void setSelectable(ReactTextView view, boolean isSelectable)
public void setSelectionColor(ReactTextView view, @Nullable java.lang.Integer color)
public void setBorderRadius(ReactTextView view, int index, float borderRadius)
public void setBorderStyle(ReactTextView view, @Nullable java.lang.String borderStyle)
public void setBorderWidth(ReactTextView view, int index, float width)
public void setBorderColor(ReactTextView view, int index, java.lang.Integer color)
public void setIncludeFontPadding(ReactTextView view, boolean includepad)
public void setDisabled(ReactTextView view, boolean disabled)
public void updateExtraData(ReactTextView view, java.lang.Object extraData)
ViewManagerReactShadowNode in
ReactShadowNode.onCollectExtraUpdates(com.facebook.react.uimanager.UIViewOperationQueue).
Since css layout step and ui updates can be executed in separate thread apart of setting
x/y/width/height this is the recommended and thread-safe way of passing extra data from css
node to the native view counterpart.
TODO(7247021): Replace updateExtraData with generic update props mechanism after D2086999updateExtraData in class ViewManager<ReactTextView,ReactTextShadowNode>public ReactTextShadowNode createShadowNodeInstance()
ViewManagerReactShadowNode which will be then used for
measuring position and size of the view. In mose of the cases this should just return an
instance of ReactShadowNodecreateShadowNodeInstance in class ViewManager<ReactTextView,ReactTextShadowNode>public java.lang.Class<ReactTextShadowNode> getShadowNodeClass()
ViewManagerClass instance that represent type of shadow node that this
manager will return from ViewManager.createShadowNodeInstance().
This method will be used in the bridge initialization phase to collect properties exposed using
ReactProp (or ReactPropGroup) annotation from the ReactShadowNode
subclass specific for native view this manager provides.getShadowNodeClass in class ViewManager<ReactTextView,ReactTextShadowNode>Class object that represents type of shadow node used by this view manager.protected void onAfterUpdateTransaction(ReactTextView view)
ViewManageronAfterUpdateTransaction in class ViewManager<ReactTextView,ReactTextShadowNode>