T - the view handled by this managerpublic abstract class SimpleViewManager<T extends android.view.View> extends ViewManager<T,ReactShadowNode>
ViewManager that applies common properties such as background
color, opacity and CSS layout. Implementations should make sure to call
super.updateView() in order for these properties to be applied.| Constructor and Description |
|---|
SimpleViewManager() |
| Modifier and Type | Method and Description |
|---|---|
ReactShadowNode |
createCSSNodeInstance()
This method should return a subclass of
CSSNode which will be then used for measuring
position and size of the view. |
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). |
void |
updateView(T root,
CatalystStylesDiffMap props)
Subclass should use this method to populate native view with updated style properties.
|
addEventEmitters, createView, createViewInstance, getCommandsMap, getExportedCustomBubblingEventTypeConstants, getExportedCustomDirectEventTypeConstants, getExportedViewConstants, getName, getNativeProps, onAfterUpdateTransaction, onDropViewInstance, receiveCommand, updatePropertiespublic 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.View,ReactShadowNode>public void updateView(T root, CatalystStylesDiffMap props)
ViewManagerupdateView in class ViewManager<T extends android.view.View,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.View,ReactShadowNode>