public class ARTSurfaceViewManager extends BaseViewManager<ARTSurfaceView,ARTSurfaceViewShadowNode>
ARTSurfaceView and handles
invalidating the native view on shadow view updates happening in the underlying tree.NativeModule.NativeMethod| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
REACT_CLASS |
PROP_NATIVE_ID, PROP_TEST_IDMETHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC| Constructor and Description |
|---|
ARTSurfaceViewManager() |
| Modifier and Type | Method and Description |
|---|---|
ARTSurfaceViewShadowNode |
createShadowNodeInstance()
This method should return a subclass of
ReactShadowNode which will be then used for
measuring position and size of the view. |
protected ARTSurfaceView |
createViewInstance(ThemedReactContext reactContext)
Subclasses should return a new View instance of the proper type.
|
java.lang.String |
getName() |
java.lang.Class<ARTSurfaceViewShadowNode> |
getShadowNodeClass()
This method should return
Class instance that represent type of shadow node that this
manager will return from ViewManager.createShadowNodeInstance(). |
void |
setBackgroundColor(ARTSurfaceView view,
int backgroundColor) |
void |
updateExtraData(ARTSurfaceView 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, setElevation, setImportantForAccessibility, setNativeId, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setTestId, setTransform, setTranslateX, setTranslateY, setZIndexaddEventEmitters, createView, getCommandsMap, getExportedCustomBubblingEventTypeConstants, getExportedCustomDirectEventTypeConstants, getExportedViewConstants, getNativeProps, onAfterUpdateTransaction, onDropViewInstance, receiveCommand, updatePropertiescanOverrideExistingModule, getConstants, hasConstants, initialize, onCatalystInstanceDestroyprotected static final java.lang.String REACT_CLASS
public java.lang.String getName()
getName in interface NativeModulegetName in class ViewManager<ARTSurfaceView,ARTSurfaceViewShadowNode>public ARTSurfaceViewShadowNode createShadowNodeInstance()
ViewManagerReactShadowNode 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 ReactShadowNodecreateShadowNodeInstance in class ViewManager<ARTSurfaceView,ARTSurfaceViewShadowNode>public java.lang.Class<ARTSurfaceViewShadowNode> getShadowNodeClass()
ViewManagerClass instance that represent type of shadow node that this
manager will return from ViewManager.createShadowNodeInstance().
This method will be used in the bridge initialization phase to collect properties exposed using
ReactProp (or ReactPropGroup) annotation from the ReactShadowNode
subclass specific for native view this manager provides.getShadowNodeClass in class ViewManager<ARTSurfaceView,ARTSurfaceViewShadowNode>Class object that represents type of shadow node used by this view manager.protected ARTSurfaceView createViewInstance(ThemedReactContext reactContext)
ViewManagercreateViewInstance in class ViewManager<ARTSurfaceView,ARTSurfaceViewShadowNode>public void updateExtraData(ARTSurfaceView 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<ARTSurfaceView,ARTSurfaceViewShadowNode>public void setBackgroundColor(ARTSurfaceView view, int backgroundColor)
setBackgroundColor in class BaseViewManager<ARTSurfaceView,ARTSurfaceViewShadowNode>