public class ReactTextViewManager extends ReactTextAnchorViewManager<ReactTextView,ReactTextShadowNode> implements IViewManagerWithChildren
ReactTextAnchorViewManager
which represents view managers of anchor
<Text>
nodes.NativeModule.NativeMethod
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REACT_CLASS |
sStateDescription
METHOD_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.util.Map |
getExportedCustomDirectEventTypeConstants()
Returns a map of config data passed to JS that defines eligible events that can be placed on
native views.
|
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() . |
long |
measure(android.content.Context context,
ReadableMap localData,
ReadableMap props,
ReadableMap state,
float width,
YogaMeasureMode widthMode,
float height,
YogaMeasureMode heightMode) |
boolean |
needsCustomLayoutForChildren()
Returns whether this View type needs to handle laying out its own children instead of deferring
to the standard css-layout algorithm.
|
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 |
setPadding(ReactTextView view,
int left,
int top,
int right,
int bottom)
Subclasses can override this method to set padding for the given View in Fabric.
|
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) . |
java.lang.Object |
updateState(ReactTextView view,
ReactStylesDiffMap props,
StateWrapper stateWrapper)
Subclasses can implement this method to receive state updates shared between all instances of
this component type.
|
setAdjustFontSizeToFit, setBorderColor, setBorderRadius, setBorderStyle, setBorderWidth, setDataDetectorType, setDisabled, setEllipsizeMode, setIncludeFontPadding, setNotifyOnInlineViewLayout, setNumberOfLines, setSelectable, setSelectionColor, setTextAlignVertical
setAccessibilityActions, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLiveRegion, setAccessibilityRole, setAccessibilityValue, setBackgroundColor, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderRadius, setBorderTopLeftRadius, setBorderTopRightRadius, setElevation, setImportantForAccessibility, setNativeId, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setTestId, setTransform, setTranslateX, setTranslateY, setViewState, setZIndex
addEventEmitters, createShadowNodeInstance, createView, createViewInstance, getCommandsMap, getDelegate, getExportedCustomBubblingEventTypeConstants, getExportedViewConstants, getNativeProps, onDropViewInstance, receiveCommand, receiveCommand, updateLocalData, updateProperties
canOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroy
public static final java.lang.String REACT_CLASS
public java.lang.String getName()
getName
in interface NativeModule
getName
in class ViewManager<ReactTextView,ReactTextShadowNode>
public ReactTextView createViewInstance(ThemedReactContext context)
ViewManager
createViewInstance
in class ViewManager<ReactTextView,ReactTextShadowNode>
public void updateExtraData(ReactTextView view, java.lang.Object extraData)
ViewManager
ReactShadowNode
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 T7247021: Replace updateExtraData with generic update props mechanism after D2086999
updateExtraData
in class ViewManager<ReactTextView,ReactTextShadowNode>
public ReactTextShadowNode createShadowNodeInstance()
ViewManager
ReactShadowNode
which will be then used for
measuring position and size of the view. In most of the cases this should just return an
instance of ReactShadowNode
createShadowNodeInstance
in class ViewManager<ReactTextView,ReactTextShadowNode>
public java.lang.Class<ReactTextShadowNode> getShadowNodeClass()
ViewManager
Class
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)
ViewManager
onAfterUpdateTransaction
in class BaseViewManager<ReactTextView,ReactTextShadowNode>
public boolean needsCustomLayoutForChildren()
IViewManagerWithChildren
needsCustomLayoutForChildren
in interface IViewManagerWithChildren
public java.lang.Object updateState(ReactTextView view, ReactStylesDiffMap props, StateWrapper stateWrapper)
ViewManager
updateState
in class ViewManager<ReactTextView,ReactTextShadowNode>
public java.util.Map getExportedCustomDirectEventTypeConstants()
ViewManager
Returned map should be of the form:
{ "onTwirl": { "registrationName": "onTwirl" } }
getExportedCustomDirectEventTypeConstants
in class BaseViewManager<ReactTextView,ReactTextShadowNode>
public long measure(android.content.Context context, ReadableMap localData, ReadableMap props, ReadableMap state, float width, YogaMeasureMode widthMode, float height, YogaMeasureMode heightMode)
measure
in class ViewManager<ReactTextView,ReactTextShadowNode>
public void setPadding(ReactTextView view, int left, int top, int right, int bottom)
ViewManager
setPadding
in class ViewManager<ReactTextView,ReactTextShadowNode>