NativeAnimatedNodesManager

This is the main class that coordinates how native animated JS implementation drives UI changes.

It implements a management interface for animated nodes graph as well as implements a graph traversal algorithm that is run for each animation frame.

For each animation frame we visit animated nodes that might've been updated as well as their children that may use parent's values to update themselves. At the end of the traversal algorithm we expect to reach a special type of the node: PropsAnimatedNode that is then responsible for calculating property map which can be sent to native view hierarchy to update the view.

IMPORTANT: This class should be accessed only from the UI Thread

Constructors

Link copied to clipboard
constructor(reactApplicationContext: ReactApplicationContext)

Functions

Link copied to clipboard
open fun addAnimatedEventToView(viewTag: Int, eventHandlerName: String, eventMapping: ReadableMap)
Link copied to clipboard
open fun connectAnimatedNodes(parentNodeTag: Int, childNodeTag: Int)
Link copied to clipboard
open fun connectAnimatedNodeToView(animatedNodeTag: Int, viewTag: Int)
Link copied to clipboard
open fun createAnimatedNode(tag: Int, config: ReadableMap)
Link copied to clipboard
open fun disconnectAnimatedNodeFromView(animatedNodeTag: Int, viewTag: Int)
Link copied to clipboard
open fun disconnectAnimatedNodes(parentNodeTag: Int, childNodeTag: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getValue(tag: Int, callback: Callback)
Link copied to clipboard
Link copied to clipboard
Initialize event listeners for Fabric UIManager or non-Fabric UIManager, exactly once.
Link copied to clipboard
open fun onEventDispatch(event: Event)
Called on every time an event is dispatched using EventDispatcher.dispatchEvent.
Link copied to clipboard
open fun removeAnimatedEventFromView(viewTag: Int, eventHandlerName: String, animatedValueTag: Int)
Link copied to clipboard
open fun restoreDefaultValues(animatedNodeTag: Int)
Link copied to clipboard
open fun runUpdates(frameTimeNanos: Long)
Animation loop performs two BFSes over the graph of animated nodes.
Link copied to clipboard
open fun setAnimatedNodeOffset(tag: Int, offset: Double)
Link copied to clipboard
open fun setAnimatedNodeValue(tag: Int, value: Double)
Link copied to clipboard
open fun startAnimatingNode(animationId: Int, animatedNodeTag: Int, animationConfig: ReadableMap, @Nullable endCallback: Callback)
Link copied to clipboard
open fun startListeningToAnimatedNodeValue(tag: Int, listener: AnimatedNodeValueListener)
Link copied to clipboard
open fun stopAnimation(animationId: Int)
Link copied to clipboard