public class FabricUIManager extends java.lang.Object implements UIManager, LifecycleEventListener
Constructor and Description |
---|
FabricUIManager(ReactApplicationContext reactContext,
ViewManagerRegistry viewManagerRegistry,
EventDispatcher eventDispatcher,
EventBeatManager eventBeatManager) |
Modifier and Type | Method and Description |
---|---|
<T extends SizeMonitoringFrameLayout & MeasureSpecProvider> |
addRootView(T rootView,
WritableMap initialProps,
java.lang.String initialUITemplate)
Registers a new root view.
|
void |
clearJSResponder() |
void |
dispatchCommand(int reactTag,
int commandId,
ReadableArray commandArgs)
Dispatches the commandId received by parameter to the view associated with the 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 |
onCatalystInstanceDestroy()
Called before {CatalystInstance#onHostDestroy}
|
void |
onHostDestroy()
Called when host activity receives destroy event (e.g.
|
void |
onHostPause()
Called when host activity receives pause event (e.g.
|
void |
onHostResume()
Called either when the host activity receives a resume event (e.g.
|
void |
onRequestEventBeat()
Method called when an event has been dispatched on the C++ side.
|
void |
profileNextBatch() |
void |
receiveEvent(int reactTag,
java.lang.String eventName,
WritableMap params) |
void |
removeRootView(int reactRootTag)
Unregisters a new root view.
|
void |
setBinding(Binding binding) |
void |
setJSResponder(int reactTag,
boolean blockNativeResponder) |
void |
updateRootLayoutSpecs(int rootTag,
int widthMeasureSpec,
int heightMeasureSpec)
Updates the layout metrics of the root view based on the Measure specs received by parameters.
|
public FabricUIManager(ReactApplicationContext reactContext, ViewManagerRegistry viewManagerRegistry, EventDispatcher eventDispatcher, EventBeatManager eventBeatManager)
public <T extends SizeMonitoringFrameLayout & MeasureSpecProvider> int addRootView(T rootView, WritableMap initialProps, java.lang.String initialUITemplate)
UIManager
addRootView
in interface UIManager
public void onRequestEventBeat()
public void removeRootView(int reactRootTag)
UIManager
removeRootView
in interface UIManager
public void initialize()
JSIModule
CatalystApplicationFragment#createCatalystInstance()
after the CatalystInstance has been created, in order to initialize NativeModules that require
the CatalystInstance or JS modules.initialize
in interface JSIModule
public void onCatalystInstanceDestroy()
JSIModule
onCatalystInstanceDestroy
in interface JSIModule
public void setBinding(Binding binding)
public void updateRootLayoutSpecs(int rootTag, int widthMeasureSpec, int heightMeasureSpec)
updateRootLayoutSpecs
in interface UIManager
public void receiveEvent(int reactTag, java.lang.String eventName, WritableMap params)
public void onHostResume()
LifecycleEventListener
Activity#onResume
or
if the native module that implements this is initialized while the host activity is already
resumed. Always called for the most current activity.onHostResume
in interface LifecycleEventListener
public void onHostPause()
LifecycleEventListener
Activity#onPause
. Always called
for the most current activity.onHostPause
in interface LifecycleEventListener
public void onHostDestroy()
LifecycleEventListener
Activity#onDestroy
. Only called
for the last React activity to be destroyed.onHostDestroy
in interface LifecycleEventListener
public void dispatchCommand(int reactTag, int commandId, ReadableArray commandArgs)
UIManager
dispatchCommand
in interface UIManager
reactTag
- int
that identifies the view that will receive this commandcommandId
- int
command idcommandArgs
- ReadableArray
parameters associated with the commandpublic void setJSResponder(int reactTag, boolean blockNativeResponder)
setJSResponder
in interface UIManager
public void clearJSResponder()
clearJSResponder
in interface UIManager
public void profileNextBatch()
profileNextBatch
in interface PerformanceCounter
public java.util.Map<java.lang.String,java.lang.Long> getPerformanceCounters()
getPerformanceCounters
in interface PerformanceCounter