public class FlatUIImplementation extends UIImplementation
UIImplementation.LayoutUpdateListener
mEventDispatcher, mLayoutUpdateListener, mShadowNodeRegistry
Modifier and Type | Method and Description |
---|---|
void |
addAnimation(int reactTag,
int animationID,
Callback onSuccess)
Adds an Animation previously registered with
UIImplementation.registerAnimation(com.facebook.react.animation.Animation) to a View and starts it |
protected void |
applyUpdatesRecursive(ReactShadowNode cssNode,
float absoluteX,
float absoluteY) |
static FlatUIImplementation |
createInstance(ReactApplicationContext reactContext,
java.util.List<ViewManager> viewManagers,
EventDispatcher eventDispatcher,
boolean memoryImprovementEnabled,
int minTimeLeftInFrameForNonBatchedOperationMs) |
protected ReactShadowNode |
createRootShadowNode() |
protected ReactShadowNode |
createShadowNode(java.lang.String className) |
void |
dispatchViewManagerCommand(int reactTag,
int commandId,
ReadableArray commandArgs) |
void |
findSubviewIn(int reactTag,
float targetX,
float targetY,
Callback callback)
Find the touch target child native view in the supplied root view hierarchy, given a react
target location.
|
protected void |
handleCreateView(ReactShadowNode cssNode,
int rootViewTag,
ReactStylesDiffMap styles) |
protected void |
handleUpdateView(ReactShadowNode cssNode,
java.lang.String className,
ReactStylesDiffMap styles) |
void |
manageChildren(int viewTag,
ReadableArray moveFrom,
ReadableArray moveTo,
ReadableArray addChildTags,
ReadableArray addAtIndices,
ReadableArray removeFrom)
Invoked when there is a mutation in a node tree.
|
void |
measure(int reactTag,
Callback callback)
Determines the location on screen, width, and height of the given view relative to the root
view and returns the values via an async callback.
|
void |
measureInWindow(int reactTag,
Callback callback)
Determines the location on screen, width, and height of the given view relative to the device
screen and returns the values via an async callback.
|
void |
removeRootView(int rootViewTag)
Unregisters a root node with a given tag.
|
void |
sendAccessibilityEvent(int reactTag,
int eventType) |
void |
setChildren(int viewTag,
ReadableArray children)
An optimized version of manageChildren that is used for initial setting of child views.
|
void |
setJSResponder(int possiblyVirtualReactTag,
boolean blockNativeResponder) |
void |
showPopupMenu(int reactTag,
ReadableArray items,
Callback error,
Callback success)
Show a PopupMenu.
|
protected void |
updateViewHierarchy() |
addUIBlock, calculateRootLayout, clearJSResponder, configureNextLayoutAnimation, createView, dispatchViewUpdates, enableLayoutCalculationForRootNode, getProfiledBatchPerfCounters, measureLayout, measureLayoutRelativeToParent, onHostDestroy, onHostPause, onHostResume, prependUIBlock, profileNextBatch, registerAnimation, registerRootView, removeAnimation, removeLayoutUpdateListener, removeRootShadowNode, removeShadowNode, removeSubviewsFromContainerWithID, replaceExistingNonRootView, resolveRootTagFromReactTag, resolveShadowNode, resolveViewManager, setLayoutAnimationEnabledExperimental, setLayoutUpdateListener, setViewHierarchyUpdateDebugListener, setViewLocalData, synchronouslyUpdateViewOnUIThread, updateNodeSize, updateRootView, updateRootView, updateView, viewIsDescendantOf
public static FlatUIImplementation createInstance(ReactApplicationContext reactContext, java.util.List<ViewManager> viewManagers, EventDispatcher eventDispatcher, boolean memoryImprovementEnabled, int minTimeLeftInFrameForNonBatchedOperationMs)
protected ReactShadowNode createRootShadowNode()
createRootShadowNode
in class UIImplementation
protected ReactShadowNode createShadowNode(java.lang.String className)
createShadowNode
in class UIImplementation
protected void handleCreateView(ReactShadowNode cssNode, int rootViewTag, @Nullable ReactStylesDiffMap styles)
handleCreateView
in class UIImplementation
protected void handleUpdateView(ReactShadowNode cssNode, java.lang.String className, ReactStylesDiffMap styles)
handleUpdateView
in class UIImplementation
public void manageChildren(int viewTag, @Nullable ReadableArray moveFrom, @Nullable ReadableArray moveTo, @Nullable ReadableArray addChildTags, @Nullable ReadableArray addAtIndices, @Nullable ReadableArray removeFrom)
UIImplementation
manageChildren
in class UIImplementation
public void setChildren(int viewTag, ReadableArray children)
UIImplementation
setChildren
in class UIImplementation
viewTag
- tag of the parentchildren
- tags of the childrenpublic void measure(int reactTag, Callback callback)
UIImplementation
measure
in class UIImplementation
public void findSubviewIn(int reactTag, float targetX, float targetY, Callback callback)
UIImplementation
findSubviewIn
in class UIImplementation
reactTag
- the tag of the root view to traversetargetX
- target X locationtargetY
- target Y locationcallback
- will be called if with the identified child view react ID, and measurement
info. If no view was found, callback will be invoked with no data.public void measureInWindow(int reactTag, Callback callback)
UIImplementation
measureInWindow
in class UIImplementation
public void addAnimation(int reactTag, int animationID, Callback onSuccess)
UIImplementation
UIImplementation.registerAnimation(com.facebook.react.animation.Animation)
to a View and starts itaddAnimation
in class UIImplementation
public void dispatchViewManagerCommand(int reactTag, int commandId, ReadableArray commandArgs)
dispatchViewManagerCommand
in class UIImplementation
public void showPopupMenu(int reactTag, ReadableArray items, Callback error, Callback success)
UIImplementation
showPopupMenu
in class UIImplementation
reactTag
- the tag of the anchor view (the PopupMenu is displayed next to this view); this
needs to be the tag of a native view (shadow views can not be anchors)items
- the menu items as an array of stringserror
- will be called if there is an error displaying the menusuccess
- will be called with the position of the selected item as the first argument, or
no arguments if the menu is dismissedpublic void sendAccessibilityEvent(int reactTag, int eventType)
sendAccessibilityEvent
in class UIImplementation
protected void updateViewHierarchy()
updateViewHierarchy
in class UIImplementation
protected void applyUpdatesRecursive(ReactShadowNode cssNode, float absoluteX, float absoluteY)
applyUpdatesRecursive
in class UIImplementation
public void removeRootView(int rootViewTag)
UIImplementation
removeRootView
in class UIImplementation
public void setJSResponder(int possiblyVirtualReactTag, boolean blockNativeResponder)
setJSResponder
in class UIImplementation