public class ReactViewManager extends ViewGroupManager<ReactViewGroup>
NativeModule.NativeMethod| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REACT_CLASS |
PROP_NATIVE_ID, PROP_TEST_ID, sStateDescriptionMETHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC| Constructor and Description |
|---|
ReactViewManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEventEmitters(ThemedReactContext reactContext,
ReactViewGroup reactViewGroup)
Subclasses can override this method to install custom event emitters on the given View.
|
void |
addView(ReactViewGroup parent,
android.view.View child,
int index) |
ReactViewGroup |
createViewInstance(ThemedReactContext context)
Subclasses should return a new View instance of the proper type.
|
android.view.View |
getChildAt(ReactViewGroup parent,
int index) |
int |
getChildCount(ReactViewGroup parent) |
java.util.Map<java.lang.String,java.lang.Integer> |
getCommandsMap()
Subclasses of
ViewManager that expect to receive commands through
UIManagerModule.dispatchViewManagerCommand(int, int, com.facebook.react.bridge.ReadableArray) should override this method returning the
map between names of the commands and IDs that are then used in ViewManager.receiveCommand(T, int, com.facebook.react.bridge.ReadableArray) method
whenever the command is dispatched for this particular ViewManager. |
java.util.Map<java.lang.String,java.lang.Object> |
getExportedCustomBubblingEventTypeConstants()
Returns a map of config data passed to JS that defines eligible events that can be placed on
native views.
|
java.lang.String |
getName() |
void |
nextFocusDown(ReactViewGroup view,
int viewId) |
void |
nextFocusForward(ReactViewGroup view,
int viewId) |
void |
nextFocusLeft(ReactViewGroup view,
int viewId) |
void |
nextFocusRight(ReactViewGroup view,
int viewId) |
void |
nextFocusUp(ReactViewGroup view,
int viewId) |
void |
receiveCommand(ReactViewGroup root,
int commandId,
ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the
UIManager. |
void |
removeAllViews(ReactViewGroup parent) |
void |
removeViewAt(ReactViewGroup parent,
int index) |
void |
setBackfaceVisibility(ReactViewGroup view,
java.lang.String backfaceVisibility) |
void |
setBorderColor(ReactViewGroup view,
int index,
java.lang.Integer color) |
void |
setBorderRadius(ReactViewGroup view,
int index,
float borderRadius) |
void |
setBorderStyle(ReactViewGroup view,
java.lang.String borderStyle) |
void |
setBorderWidth(ReactViewGroup view,
int index,
float width) |
void |
setClickable(ReactViewGroup view,
boolean clickable) |
void |
setCollapsable(ReactViewGroup view,
boolean collapsable) |
void |
setHitSlop(ReactViewGroup view,
ReadableMap hitSlop) |
void |
setNativeBackground(ReactViewGroup view,
ReadableMap bg) |
void |
setNativeForeground(ReactViewGroup view,
ReadableMap fg) |
void |
setNeedsOffscreenAlphaCompositing(ReactViewGroup view,
boolean needsOffscreenAlphaCompositing) |
void |
setOpacity(ReactViewGroup view,
float opacity) |
void |
setOverflow(ReactViewGroup view,
java.lang.String overflow) |
void |
setPointerEvents(ReactViewGroup view,
java.lang.String pointerEventsStr) |
void |
setRemoveClippedSubviews(ReactViewGroup view,
boolean removeClippedSubviews) |
void |
setTransform(ReactViewGroup view,
ReadableArray matrix) |
void |
setTVPreferredFocus(ReactViewGroup view,
boolean hasTVPreferredFocus) |
addViews, createShadowNodeInstance, getShadowNodeClass, getViewZIndex, needsCustomLayoutForChildren, removeView, setViewZIndex, shouldPromoteGrandchildren, updateExtraDatagetExportedCustomDirectEventTypeConstants, onAfterUpdateTransaction, setAccessibilityActions, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLiveRegion, setAccessibilityNodeInfo, setAccessibilityRole, setAccessible, setBackgroundColor, setElevation, setImportantForAccessibility, setNativeId, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setTestId, setTranslateX, setTranslateY, setViewStates, setZIndexcreateShadowNodeInstance, createViewInstanceWithProps, createViewWithProps, getExportedViewConstants, getNativeProps, measure, onDropViewInstance, updateLocalData, updateProperties, updateStatecanOverrideExistingModule, getConstants, hasConstants, initialize, onCatalystInstanceDestroypublic static final java.lang.String REACT_CLASS
public void setTVPreferredFocus(ReactViewGroup view, boolean hasTVPreferredFocus)
public void nextFocusDown(ReactViewGroup view, int viewId)
public void nextFocusForward(ReactViewGroup view, int viewId)
public void nextFocusLeft(ReactViewGroup view, int viewId)
public void nextFocusRight(ReactViewGroup view, int viewId)
public void nextFocusUp(ReactViewGroup view, int viewId)
public void setBorderRadius(ReactViewGroup view, int index, float borderRadius)
public java.util.Map<java.lang.String,java.lang.Object> getExportedCustomBubblingEventTypeConstants()
ViewManagergetExportedCustomBubblingEventTypeConstants in class ViewManager<ReactViewGroup,LayoutShadowNode>protected void addEventEmitters(ThemedReactContext reactContext, ReactViewGroup reactViewGroup)
ViewManageraddEventEmitters in class ViewManager<ReactViewGroup,LayoutShadowNode>public void setBorderStyle(ReactViewGroup view, java.lang.String borderStyle)
public void setHitSlop(ReactViewGroup view, ReadableMap hitSlop)
public void setPointerEvents(ReactViewGroup view, java.lang.String pointerEventsStr)
public void setNativeBackground(ReactViewGroup view, ReadableMap bg)
public void setNativeForeground(ReactViewGroup view, ReadableMap fg)
public void setRemoveClippedSubviews(ReactViewGroup view, boolean removeClippedSubviews)
public void setNeedsOffscreenAlphaCompositing(ReactViewGroup view, boolean needsOffscreenAlphaCompositing)
public void setBorderWidth(ReactViewGroup view, int index, float width)
public void setBorderColor(ReactViewGroup view, int index, java.lang.Integer color)
public void setCollapsable(ReactViewGroup view, boolean collapsable)
public void setClickable(ReactViewGroup view, boolean clickable)
public void setOverflow(ReactViewGroup view, java.lang.String overflow)
public void setBackfaceVisibility(ReactViewGroup view, java.lang.String backfaceVisibility)
public void setOpacity(ReactViewGroup view, float opacity)
setOpacity in class BaseViewManager<ReactViewGroup,LayoutShadowNode>public void setTransform(ReactViewGroup view, ReadableArray matrix)
setTransform in class BaseViewManager<ReactViewGroup,LayoutShadowNode>public java.lang.String getName()
getName in interface NativeModulegetName in class ViewManager<ReactViewGroup,LayoutShadowNode>public ReactViewGroup createViewInstance(ThemedReactContext context)
ViewManagercreateViewInstance in class ViewManager<ReactViewGroup,LayoutShadowNode>public java.util.Map<java.lang.String,java.lang.Integer> getCommandsMap()
ViewManagerViewManager that expect to receive commands through
UIManagerModule.dispatchViewManagerCommand(int, int, com.facebook.react.bridge.ReadableArray) should override this method returning the
map between names of the commands and IDs that are then used in ViewManager.receiveCommand(T, int, com.facebook.react.bridge.ReadableArray) method
whenever the command is dispatched for this particular ViewManager.getCommandsMap in class ViewManager<ReactViewGroup,LayoutShadowNode>public void receiveCommand(ReactViewGroup root, int commandId, ReadableArray args)
ViewManagerUIManager. Good example of such a command would be scrollTo request with
coordinates for a ScrollView instance.receiveCommand in class ViewManager<ReactViewGroup,LayoutShadowNode>root - View instance that should receive the commandcommandId - code of the commandargs - optional arguments for the commandpublic void addView(ReactViewGroup parent, android.view.View child, int index)
addView in class ViewGroupManager<ReactViewGroup>public int getChildCount(ReactViewGroup parent)
getChildCount in class ViewGroupManager<ReactViewGroup>public android.view.View getChildAt(ReactViewGroup parent, int index)
getChildAt in class ViewGroupManager<ReactViewGroup>public void removeViewAt(ReactViewGroup parent, int index)
removeViewAt in class ViewGroupManager<ReactViewGroup>public void removeAllViews(ReactViewGroup parent)
removeAllViews in class ViewGroupManager<ReactViewGroup>