UIViewOperationQueue

This class acts as a buffer for command executed on NativeViewHierarchyManager. It expose similar methods as mentioned classes but instead of executing commands immediately it enqueues those operations in a queue that is then flushed from UIManagerModule once JS batch of ui operations is finished. This is to make sure that we execute all the JS operation coming from a single batch a single loop of the main (UI) android looper.

TODO(7135923): Pooling of operation objects TODO(5694019): Consider a better data structure for operations queue to save on allocations

Constructors

Link copied to clipboard
constructor(reactContext: ReactApplicationContext, nativeViewHierarchyManager: NativeViewHierarchyManager, minTimeLeftInFrameForNonBatchedOperationMs: Int)

Types

Link copied to clipboard
interface UIOperation
A mutation or animation operation on the view hierarchy.

Functions

Link copied to clipboard
open fun addRootView(tag: Int, rootView: View)
Link copied to clipboard
open fun dispatchViewUpdates(batchId: Int, commitStartTime: Long, layoutTime: Long)
Link copied to clipboard
Link copied to clipboard
open fun enqueueConfigureLayoutAnimation(config: ReadableMap, onAnimationComplete: Callback)
Link copied to clipboard
open fun enqueueCreateView(themedContext: ThemedReactContext, viewReactTag: Int, viewClassName: String, @Nullable initialProps: ReactStylesDiffMap)
Link copied to clipboard
open fun enqueueDispatchCommand(reactTag: Int, commandId: Int, @Nullable commandArgs: ReadableArray)
open fun enqueueDispatchCommand(reactTag: Int, commandId: String, @Nullable commandArgs: ReadableArray)
Link copied to clipboard
open fun enqueueFindTargetForTouch(reactTag: Int, targetX: Float, targetY: Float, callback: Callback)
Link copied to clipboard
open fun enqueueManageChildren(reactTag: Int, @Nullable indicesToRemove: Array<Int>, @Nullable viewsToAdd: Array<ViewAtIndex>, @Nullable tagsToDelete: Array<Int>)
Link copied to clipboard
open fun enqueueMeasure(reactTag: Int, callback: Callback)
Link copied to clipboard
open fun enqueueMeasureInWindow(reactTag: Int, callback: Callback)
Link copied to clipboard
open fun enqueueRemoveRootView(rootViewTag: Int)
Link copied to clipboard
open fun enqueueSendAccessibilityEvent(tag: Int, eventType: Int)
Link copied to clipboard
open fun enqueueSetChildren(reactTag: Int, childrenTags: ReadableArray)
Link copied to clipboard
open fun enqueueSetJSResponder(tag: Int, initialTag: Int, blockNativeResponder: Boolean)
Link copied to clipboard
Link copied to clipboard
open fun enqueueUIBlock(block: UIBlock)
Link copied to clipboard
open fun enqueueUpdateExtraData(reactTag: Int, extraData: Any)
Link copied to clipboard
open fun enqueueUpdateInstanceHandle(reactTag: Int, instanceHandle: Long)
Link copied to clipboard
open fun enqueueUpdateLayout(parentTag: Int, reactTag: Int, x: Int, y: Int, width: Int, height: Int)
open fun enqueueUpdateLayout(parentTag: Int, reactTag: Int, x: Int, y: Int, width: Int, height: Int, layoutDirection: YogaDirection)
Link copied to clipboard
open fun enqueueUpdateProperties(reactTag: Int, className: String, props: ReactStylesDiffMap)
Link copied to clipboard
open fun isEmpty(): Boolean
Link copied to clipboard
open fun prependUIBlock(block: UIBlock)
Link copied to clipboard
open fun profileNextBatch()
Link copied to clipboard
open fun setViewHierarchyUpdateDebugListener(@Nullable listener: NotThreadSafeViewHierarchyUpdateDebugListener)