public class FabricUIManager extends java.lang.Object implements UIManager, JSHandler
ReactShadowNode using the Fabric
API.| Constructor and Description |
|---|
FabricUIManager(ReactApplicationContext reactContext,
ViewManagerRegistry viewManagerRegistry,
JavaScriptContextHolder jsContext,
EventDispatcher eventDispatcher) |
| Modifier and Type | Method and Description |
|---|---|
<T extends SizeMonitoringFrameLayout & MeasureSpecProvider> |
addRootView(T rootView)
Registers a new root view.
|
void |
appendChild(ReactShadowNode parent,
ReactShadowNode child)
Appends the child
ReactShadowNode to the children set of the parent ReactShadowNode. |
void |
appendChildToSet(java.util.List<ReactShadowNode> childList,
ReactShadowNode child)
Adds the
ReactShadowNode to the List received by parameter. |
void |
clearJSResponder() |
ReactShadowNode |
cloneNode(ReactShadowNode node) |
ReactShadowNode |
cloneNodeWithNewChildren(ReactShadowNode node) |
ReactShadowNode |
cloneNodeWithNewChildrenAndProps(ReactShadowNode node,
ReadableNativeMap newProps) |
ReactShadowNode |
cloneNodeWithNewProps(ReactShadowNode node,
ReadableNativeMap newProps) |
void |
completeRoot(int rootTag,
java.util.List<ReactShadowNode> childList) |
java.util.List<ReactShadowNode> |
createChildSet(int rootTag) |
ReactShadowNode |
createNode(int reactTag,
java.lang.String viewName,
int rootTag,
ReadableNativeMap props,
long eventTarget)
Creates a new
ReactShadowNode |
void |
dispatchCommand(int reactTag,
int commandId,
ReadableArray commandArgs)
Dispatches the commandId received by parameter to the view associated with the reactTag.
|
long |
getEventTarget(int reactTag) |
java.util.Map<java.lang.String,java.lang.Long> |
getPerformanceCounters() |
void |
initialize()
This is called at the end of
CatalystApplicationFragment#createCatalystInstance()
after the CatalystInstance has been created, in order to initialize NativeModules that require
the CatalystInstance or JS modules. |
void |
invoke(long eventTarget,
java.lang.String name,
WritableMap params) |
void |
onCatalystInstanceDestroy()
Called before {CatalystInstance#onHostDestroy}
|
void |
profileNextBatch() |
void |
registerEventHandler(long eventHandlerPointer) |
void |
releaseEventHandler(long eventHandlerPointer) |
void |
releaseEventTarget(long eventTargetPointer) |
void |
removeRootView(int rootTag) |
void |
setBinding(FabricBinding binding) |
void |
setJSResponder(int reactTag,
boolean blockNativeResponder) |
void |
updateRootLayoutSpecs(int rootViewTag,
int widthMeasureSpec,
int heightMeasureSpec)
Updates the layout specs of the RootShadowNode based on the Measure specs received by
parameters.
|
public FabricUIManager(ReactApplicationContext reactContext, ViewManagerRegistry viewManagerRegistry, JavaScriptContextHolder jsContext, EventDispatcher eventDispatcher)
public void setBinding(FabricBinding binding)
public ReactShadowNode createNode(int reactTag, java.lang.String viewName, int rootTag, ReadableNativeMap props, long eventTarget)
ReactShadowNodepublic ReactShadowNode cloneNode(ReactShadowNode node)
ReactShadowNode received by parameter. The cloned
ReactShadowNode will contain a copy of all the internal data of the original node,
including its children set (note that the children nodes will not be cloned).public ReactShadowNode cloneNodeWithNewChildren(ReactShadowNode node)
ReactShadowNode received by parameter. The cloned
ReactShadowNode will contain a copy of all the internal data of the original node, but its
children set will be empty.public ReactShadowNode cloneNodeWithNewProps(ReactShadowNode node, ReadableNativeMap newProps)
ReactShadowNode received by parameter. The cloned
ReactShadowNode will contain a copy of all the internal data of the original node, but its
props will be overridden with the ReadableMap received by parameter.public ReactShadowNode cloneNodeWithNewChildrenAndProps(ReactShadowNode node, ReadableNativeMap newProps)
ReactShadowNode received by parameter. The cloned
ReactShadowNode will contain a copy of all the internal data of the original node, but its
props will be overridden with the ReadableMap received by parameter and its
children set will be empty.public void appendChild(ReactShadowNode parent, ReactShadowNode child)
ReactShadowNode to the children set of the parent ReactShadowNode.public java.util.List<ReactShadowNode> createChildSet(int rootTag)
List that will be used to append the ReactShadowNode elements of the root. Typically this List will contain one element.public void appendChildToSet(java.util.List<ReactShadowNode> childList, ReactShadowNode child)
ReactShadowNode to the List received by parameter.public void completeRoot(int rootTag,
java.util.List<ReactShadowNode> childList)
public void dispatchCommand(int reactTag,
int commandId,
ReadableArray commandArgs)
UIManagerdispatchCommand in interface UIManagerreactTag - int that identifies the view that will receive this commandcommandId - int command idcommandArgs - ReadableArray parameters associated with the commandpublic <T extends SizeMonitoringFrameLayout & MeasureSpecProvider> int addRootView(T rootView)
UIManageraddRootView in interface UIManagerpublic void updateRootLayoutSpecs(int rootViewTag,
int widthMeasureSpec,
int heightMeasureSpec)
UIManagerupdateRootLayoutSpecs in interface UIManagerpublic void removeRootView(int rootTag)
public long getEventTarget(int reactTag)
public void registerEventHandler(long eventHandlerPointer)
public void releaseEventTarget(long eventTargetPointer)
public void releaseEventHandler(long eventHandlerPointer)
public void invoke(long eventTarget,
java.lang.String name,
WritableMap params)
public void setJSResponder(int reactTag,
boolean blockNativeResponder)
setJSResponder in interface UIManagerpublic void clearJSResponder()
clearJSResponder in interface UIManagerpublic void initialize()
JSIModuleCatalystApplicationFragment#createCatalystInstance()
after the CatalystInstance has been created, in order to initialize NativeModules that require
the CatalystInstance or JS modules.initialize in interface JSIModulepublic void onCatalystInstanceDestroy()
JSIModuleonCatalystInstanceDestroy in interface JSIModulepublic void profileNextBatch()
profileNextBatch in interface PerformanceCounterpublic java.util.Map<java.lang.String,java.lang.Long> getPerformanceCounters()
getPerformanceCounters in interface PerformanceCounter