public abstract class ViewGroupManager<T extends android.view.ViewGroup> extends BaseViewManager<T,ReactShadowNode>
PROP_TEST_ID| Constructor and Description |
|---|
ViewGroupManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addView(T parent,
android.view.View child,
int index) |
ReactShadowNode |
createCSSNodeInstance()
This method should return a subclass of
CSSNode which will be then used for measuring
position and size of the view. |
android.view.View |
getChildAt(T parent,
int index) |
int |
getChildCount(T parent) |
boolean |
needsCustomLayoutForChildren()
Returns whether this View type needs to handle laying out its own children instead of
deferring to the standard css-layout algorithm.
|
void |
removeView(T parent,
android.view.View child) |
void |
updateExtraData(T root,
java.lang.Object extraData)
Subclasses can implement this method to receive an optional extra data enqueued from the
corresponding instance of
ReactShadowNode in
ReactShadowNode.onCollectExtraUpdates(com.facebook.react.uimanager.UIViewOperationQueue). |
setAccessibilityComponentType, setAccessibilityLabel, setAccessibilityLiveRegion, setBackgroundColor, setDecomposedMatrix, setImportantForAccessibility, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setTestId, setTranslateX, setTranslateYaddEventEmitters, createView, createViewInstance, getCommandsMap, getExportedCustomBubblingEventTypeConstants, getExportedCustomDirectEventTypeConstants, getExportedViewConstants, getName, getNativeProps, onAfterUpdateTransaction, onDropViewInstance, receiveCommand, updateProperties, updateViewpublic ReactShadowNode createCSSNodeInstance()
ViewManagerCSSNode which will be then used for measuring
position and size of the view. In mose of the cases this should just return an instance of
CSSNodecreateCSSNodeInstance in class ViewManager<T extends android.view.ViewGroup,ReactShadowNode>public void updateExtraData(T root, java.lang.Object extraData)
ViewManagerReactShadowNode in
ReactShadowNode.onCollectExtraUpdates(com.facebook.react.uimanager.UIViewOperationQueue).
Since css layout step and ui updates can be executed in separate thread apart of setting
x/y/width/height this is the recommended and thread-safe way of passing extra data from css
node to the native view counterpart.
TODO(7247021): Replace updateExtraData with generic update props mechanism after D2086999updateExtraData in class ViewManager<T extends android.view.ViewGroup,ReactShadowNode>public void addView(T parent, android.view.View child, int index)
public int getChildCount(T parent)
public android.view.View getChildAt(T parent, int index)
public void removeView(T parent, android.view.View child)
public boolean needsCustomLayoutForChildren()