public class ReactViewManager extends ReactClippingViewManager<ReactViewGroup>
NativeModule.NativeMethod
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REACT_CLASS |
sStateDescription
METHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC
Constructor and Description |
---|
ReactViewManager() |
Modifier and Type | Method and Description |
---|---|
ReactViewGroup |
createViewInstance(ThemedReactContext context)
Subclasses should return a new View instance of the proper type.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getCommandsMap()
Subclasses of
ViewManager that expect to receive commands through UIManagerModule.dispatchViewManagerCommand(int, com.facebook.react.bridge.Dynamic, 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.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 |
receiveCommand(ReactViewGroup root,
java.lang.String commandId,
ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the
UIManager . |
void |
setAccessible(ReactViewGroup view,
boolean accessible) |
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 |
setCollapsable(ReactViewGroup view,
boolean collapsable) |
void |
setFocusable(ReactViewGroup view,
boolean focusable) |
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 |
setTransform(ReactViewGroup view,
ReadableArray matrix) |
void |
setTVPreferredFocus(ReactViewGroup view,
boolean hasTVPreferredFocus) |
addView, getChildAt, getChildCount, removeAllViews, removeViewAt, setRemoveClippedSubviews
addViews, createShadowNodeInstance, getShadowNodeClass, getViewZIndex, needsCustomLayoutForChildren, removeView, setViewZIndex, shouldPromoteGrandchildren, updateExtraData
getExportedCustomDirectEventTypeConstants, onAfterUpdateTransaction, setAccessibilityActions, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLiveRegion, setAccessibilityRole, setAccessibilityValue, setBackgroundColor, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderRadius, setBorderTopLeftRadius, setBorderTopRightRadius, setElevation, setImportantForAccessibility, setNativeId, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setTestId, setTranslateX, setTranslateY, setViewState, setZIndex
addEventEmitters, createShadowNodeInstance, createView, createViewInstance, getDelegate, getExportedCustomBubblingEventTypeConstants, getExportedViewConstants, getNativeProps, measure, onDropViewInstance, setPadding, updateLocalData, updateProperties, updateState
canOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroy
public static final java.lang.String REACT_CLASS
public void setAccessible(ReactViewGroup view, boolean accessible)
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 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 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 setFocusable(ReactViewGroup view, boolean focusable)
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 interface BaseViewManagerInterface<ReactViewGroup>
setOpacity
in class BaseViewManager<ReactViewGroup,LayoutShadowNode>
public void setTransform(ReactViewGroup view, ReadableArray matrix)
setTransform
in interface BaseViewManagerInterface<ReactViewGroup>
setTransform
in class BaseViewManager<ReactViewGroup,LayoutShadowNode>
public java.lang.String getName()
getName
in interface NativeModule
getName
in class ViewManager<ReactViewGroup,LayoutShadowNode>
public ReactViewGroup createViewInstance(ThemedReactContext context)
ViewManager
createViewInstance
in class ViewManager<ReactViewGroup,LayoutShadowNode>
public java.util.Map<java.lang.String,java.lang.Integer> getCommandsMap()
ViewManager
ViewManager
that expect to receive commands through UIManagerModule.dispatchViewManagerCommand(int, com.facebook.react.bridge.Dynamic, 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)
ViewManager
UIManager
. Good example of such a command would be scrollTo
request with coordinates
for a ScrollView
instance.
This method is deprecated use ViewManager.receiveCommand(View, String, ReadableArray)
instead.
receiveCommand
in class ViewManager<ReactViewGroup,LayoutShadowNode>
root
- View instance that should receive the commandcommandId
- code of the commandargs
- optional arguments for the commandpublic void receiveCommand(ReactViewGroup root, java.lang.String commandId, ReadableArray args)
ViewManager
UIManager
. Good example of such a command would be scrollTo
request with coordinates
for a ReactScrollView
instance.receiveCommand
in class ViewManager<ReactViewGroup,LayoutShadowNode>
root
- View instance that should receive the commandcommandId
- code of the commandargs
- optional arguments for the command