public class ReactTextViewManager extends ViewManager<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 use| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_LINE_HEIGHT |
static java.lang.String |
PROP_NUMBER_OF_LINES |
static java.lang.String |
PROP_TEXT_ALIGN |
static java.lang.String |
REACT_CLASS |
| Constructor and Description |
|---|
ReactTextViewManager() |
| Modifier and Type | Method and Description |
|---|---|
ReactTextShadowNode |
createCSSNodeInstance()
This method should return a subclass of
CSSNode 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() |
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). |
void |
updateView(ReactTextView view,
CatalystStylesDiffMap props)
Subclass should use this method to populate native view with updated style properties.
|
addEventEmitters, createView, getCommandsMap, getExportedCustomBubblingEventTypeConstants, getExportedCustomDirectEventTypeConstants, getExportedViewConstants, getNativeProps, onDropViewInstance, receiveCommandpublic static final java.lang.String REACT_CLASS
public static final java.lang.String PROP_NUMBER_OF_LINES
public static final java.lang.String PROP_TEXT_ALIGN
public static final java.lang.String PROP_LINE_HEIGHT
public java.lang.String getName()
getName in class ViewManager<ReactTextView,ReactTextShadowNode>public ReactTextView createViewInstance(ThemedReactContext context)
ViewManagercreateViewInstance in class ViewManager<ReactTextView,ReactTextShadowNode>public void updateView(ReactTextView view, CatalystStylesDiffMap props)
ViewManagerupdateView in class ViewManager<ReactTextView,ReactTextShadowNode>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 createCSSNodeInstance()
ViewManagerCSSNode 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
CSSNodecreateCSSNodeInstance in class ViewManager<ReactTextView,ReactTextShadowNode>