Package 

Interface UIManager

  • All Implemented Interfaces:
    com.facebook.react.bridge.JSIModule , com.facebook.react.bridge.PerformanceCounter

    
    public interface UIManager
     implements JSIModule, PerformanceCounter
                        
    • Method Detail

      • startSurface

        @AnyThread() abstract <T extends View> int startSurface(T rootView, String moduleName, WritableMap initialProps, int widthMeasureSpec, int heightMeasureSpec)

        Registers a new root view with width and height.

      • stopSurface

        @AnyThread() abstract void stopSurface(int surfaceId)

        Stop a surface from running in JS and clears up native memory usage. Assumes that the nativeView hierarchy has already been cleaned up. Fabric-only.

      • updateRootLayoutSpecs

        @UiThread() abstract void updateRootLayoutSpecs(int rootTag, int widthMeasureSpec, int heightMeasureSpec, int offsetX, int offsetY)

        Updates the layout specs of the RootShadowNode based on the Measure specs received byparameters. offsetX and offsetY are the position of the RootView within the screen.

      • dispatchCommand

         abstract void dispatchCommand(int reactTag, int commandId, @Nullable() ReadableArray commandArgs)

        Dispatches the commandId received by parameter to the view associated with the reactTag. Thecommand will be processed in the UIThread.

        Receiving commands as ints is deprecated and will be removed in a future release.

        Pre-Fabric, this is only called on the Native Module Thread.

        Parameters:
        reactTag - that identifies the view that will receive this command
        commandId - command id
        commandArgs - ReadableArray parameters associated with the command
      • dispatchCommand

         abstract void dispatchCommand(int reactTag, String commandId, @Nullable() ReadableArray commandArgs)

        Dispatches the commandId received by parameter to the view associated with the reactTag. Thecommand will be processed in the UIThread.

        Pre-Fabric, this is only called on the Native Module Thread.

        Parameters:
        reactTag - that identifies the view that will receive this command
        commandId - String command id
        commandArgs - ReadableArray parameters associated with the command
      • synchronouslyUpdateViewOnUIThread

        @UiThread() abstract void synchronouslyUpdateViewOnUIThread(int reactTag, ReadableMap props)

        Used by native animated module to bypass the process of updating the values through the shadowview hierarchy. This method will directly update native views, which means that updates forlayout-related propertied won't be handled properly. Make sure you know what you're doingbefore calling this method :)

        Parameters:
        reactTag - that identifies the view that will be updated
        props - ReadableMap props that should be immediately updated in view
      • sendAccessibilityEvent

         abstract void sendAccessibilityEvent(int reactTag, int eventType)

        Dispatch an accessibility event to a view asynchronously.

        Pre-Fabric, this is only called on the Native Module Thread.

      • resolveView

         abstract View resolveView(int reactTag)

        Resolves a view based on its reactTag. Do not mutate properties on this view that are alreadymanaged by React, as there are no guarantees this changes will be preserved.

        Parameters:
        reactTag - tag
      • receiveEvent

        @Deprecated() abstract void receiveEvent(int reactTag, String eventName, @Nullable() WritableMap event)

        This method dispatches events from RN Android code to JS. The delivery of this event will notbe queued in EventDispatcher class.

        Parameters:
        reactTag - tag
        eventName - name of the event
        event - parameters
      • receiveEvent

         abstract void receiveEvent(int surfaceId, int reactTag, String eventName, @Nullable() WritableMap event)

        This method dispatches events from RN Android code to JS. The delivery of this event will notbe queued in EventDispatcher class.

        Parameters:
        reactTag - tag
        eventName - name of the event
        event - parameters
      • preInitializeViewManagers

        @Deprecated() abstract void preInitializeViewManagers(List<String> viewManagerNames)

        Helper method to pre-initialize view managers. When using Native ViewConfigs this method willalso pre-compute the constants for a view manager. The purpose is to ensure that we don't blockfor getting the constants for view managers during initial rendering of a surface.

        Parameters:
        viewManagerNames - names of ViewManagers