public class ARTSurfaceViewShadowNode extends LayoutShadowNode implements android.view.TextureView.SurfaceTextureListener, LifecycleEventListener
Constructor and Description |
---|
ARTSurfaceViewShadowNode() |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
boolean |
isVirtual()
Nodes that return
true will be treated as "virtual" nodes. |
boolean |
isVirtualAnchor()
Nodes that return
true will be treated as a root view for the virtual nodes tree. |
void |
onCollectExtraUpdates(UIViewOperationQueue uiUpdater)
Called after layout step at the end of the UI batch from
UIManagerModule . |
void |
onHostDestroy()
Called when host activity receives destroy event (e.g.
|
void |
onHostPause()
Called when host activity receives pause event (e.g.
|
void |
onHostResume()
Called either when the host activity receives a resume event (e.g.
|
void |
onSurfaceTextureAvailable(android.graphics.SurfaceTexture surface,
int width,
int height) |
boolean |
onSurfaceTextureDestroyed(android.graphics.SurfaceTexture surface) |
void |
onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture surface,
int width,
int height) |
void |
onSurfaceTextureUpdated(android.graphics.SurfaceTexture surface) |
void |
setBackgroundColor(java.lang.Integer color) |
void |
setThemedContext(ThemedReactContext themedContext) |
void |
setupSurfaceTextureListener(ARTSurfaceView surfaceView) |
setAlignContent, setAlignItems, setAlignSelf, setAspectRatio, setBorderWidths, setCollapsable, setDisplay, setFlex, setFlexBasis, setFlexDirection, setFlexGrow, setFlexShrink, setFlexWrap, setHeight, setJustifyContent, setMargins, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPaddings, setPosition, setPositionValues, setShouldNotifyOnLayout, setWidth
addChildAt, addNativeChildAt, calculateLayout, calculateLayout, calculateLayoutOnChildren, dirty, dispatchUpdates, getChildAt, getChildCount, getHeightMeasureSpec, getHierarchyInfo, getLayoutDirection, getLayoutHeight, getLayoutParent, getLayoutWidth, getLayoutX, getLayoutY, getNativeChildCount, getNativeKind, getNativeOffsetForChild, getNativeParent, getPadding, getParent, getReactTag, getRootTag, getScreenHeight, getScreenWidth, getScreenX, getScreenY, getStyleHeight, getStylePadding, getStyleWidth, getThemedContext, getTotalNativeChildren, getViewClass, getWidthMeasureSpec, hasNewLayout, hasUnseenUpdates, hasUpdates, hoistNativeChildren, indexOf, indexOfNativeChild, isDescendantOf, isDirty, isLayoutOnly, isMeasureDefined, isYogaLeafNode, markLayoutSeen, markUpdated, markUpdateSeen, onAfterUpdateTransaction, onBeforeLayout, removeAllNativeChildren, removeAndDisposeAllChildren, removeChildAt, removeNativeChildAt, setAlignContent, setAlignItems, setAlignSelf, setBaselineFunction, setBorder, setDefaultPadding, setDisplay, setFlexBasis, setFlexBasisAuto, setFlexBasisPercent, setFlexDirection, setFlexWrap, setIsLayoutOnly, setJustifyContent, setLayoutDirection, setLayoutParent, setLocalData, setMargin, setMarginAuto, setMarginPercent, setMeasureFunction, setMeasureSpecs, setOverflow, setPadding, setPaddingPercent, setPosition, setPositionPercent, setPositionType, setReactTag, setRootTag, setStyleAspectRatio, setStyleHeight, setStyleHeightAuto, setStyleHeightPercent, setStyleMaxHeight, setStyleMaxHeightPercent, setStyleMaxWidth, setStyleMaxWidthPercent, setStyleMinHeight, setStyleMinHeightPercent, setStyleMinWidth, setStyleMinWidthPercent, setStyleWidth, setStyleWidthAuto, setStyleWidthPercent, setViewClassName, shouldNotifyOnLayout, toString, updateProperties
public void setBackgroundColor(java.lang.Integer color)
public boolean isVirtual()
ReactShadowNodeImpl
true
will be treated as "virtual" nodes. That is, nodes that are not
mapped into native views or Yoga nodes (e.g. nested text node). By default this method returns
false
.isVirtual
in interface ReactShadowNode<ReactShadowNodeImpl>
isVirtual
in class ReactShadowNodeImpl
public boolean isVirtualAnchor()
ReactShadowNodeImpl
true
will be treated as a root view for the virtual nodes tree. It
means that all of its descendants will be "virtual" nodes. Good example is InputText
view that may have children Text
nodes but this whole hierarchy will be mapped to a
single android EditText
view.isVirtualAnchor
in interface ReactShadowNode<ReactShadowNodeImpl>
isVirtualAnchor
in class ReactShadowNodeImpl
public void onCollectExtraUpdates(UIViewOperationQueue uiUpdater)
ReactShadowNodeImpl
UIManagerModule
. May be used
to enqueue additional ui operations for the native view. Will only be called on nodes marked as
updated either with ReactShadowNodeImpl.dirty()
or ReactShadowNodeImpl.markUpdated()
.onCollectExtraUpdates
in interface ReactShadowNode<ReactShadowNodeImpl>
onCollectExtraUpdates
in class ReactShadowNodeImpl
uiUpdater
- interface for enqueueing UI operationspublic void setupSurfaceTextureListener(ARTSurfaceView surfaceView)
public void setThemedContext(ThemedReactContext themedContext)
setThemedContext
in interface ReactShadowNode<ReactShadowNodeImpl>
setThemedContext
in class ReactShadowNodeImpl
public void dispose()
dispose
in interface ReactShadowNode<ReactShadowNodeImpl>
dispose
in class ReactShadowNodeImpl
public void onHostResume()
LifecycleEventListener
Activity#onResume
or
if the native module that implements this is initialized while the host activity is already
resumed. Always called for the most current activity.onHostResume
in interface LifecycleEventListener
public void onHostPause()
LifecycleEventListener
Activity#onPause
. Always called
for the most current activity.onHostPause
in interface LifecycleEventListener
public void onHostDestroy()
LifecycleEventListener
Activity#onDestroy
. Only called
for the last React activity to be destroyed.onHostDestroy
in interface LifecycleEventListener
public void onSurfaceTextureAvailable(android.graphics.SurfaceTexture surface, int width, int height)
onSurfaceTextureAvailable
in interface android.view.TextureView.SurfaceTextureListener
public boolean onSurfaceTextureDestroyed(android.graphics.SurfaceTexture surface)
onSurfaceTextureDestroyed
in interface android.view.TextureView.SurfaceTextureListener
public void onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture surface, int width, int height)
onSurfaceTextureSizeChanged
in interface android.view.TextureView.SurfaceTextureListener
public void onSurfaceTextureUpdated(android.graphics.SurfaceTexture surface)
onSurfaceTextureUpdated
in interface android.view.TextureView.SurfaceTextureListener