-
- All Implemented Interfaces:
-
com.facebook.react.bridge.NativeModule
,com.facebook.react.uimanager.BaseViewManagerInterface
,com.facebook.react.uimanager.IViewManagerWithChildren
public class ReactViewManager extends ReactClippingViewManager<ReactViewGroup>
View manager for AndroidViews (plain React Views).
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
REACT_CLASS
-
Method Summary
Modifier and Type Method Description void
setAccessible(ReactViewGroup view, boolean accessible)
void
setTVPreferredFocus(ReactViewGroup view, boolean hasTVPreferredFocus)
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
setBorderRadius(ReactViewGroup view, int index, float borderRadius)
void
setBorderStyle(ReactViewGroup view, @Nullable() String borderStyle)
void
setHitSlop(ReactViewGroup view, Dynamic hitSlop)
void
setPointerEvents(ReactViewGroup view, @Nullable() String pointerEventsStr)
void
setNativeBackground(ReactViewGroup view, @Nullable() ReadableMap bg)
void
setNativeForeground(ReactViewGroup view, @Nullable() ReadableMap fg)
void
setNeedsOffscreenAlphaCompositing(ReactViewGroup view, boolean needsOffscreenAlphaCompositing)
void
setBorderWidth(ReactViewGroup view, int index, float width)
void
setBorderColor(ReactViewGroup view, int index, Integer color)
void
setCollapsable(ReactViewGroup view, boolean collapsable)
void
setFocusable(ReactViewGroup view, boolean focusable)
void
setOverflow(ReactViewGroup view, String overflow)
void
setBackfaceVisibility(ReactViewGroup view, String backfaceVisibility)
void
setOpacity(@NonNull() ReactViewGroup view, float opacity)
void
setTransform(@NonNull() ReactViewGroup view, @Nullable() ReadableArray matrix)
String
getName()
ReactViewGroup
createViewInstance(ThemedReactContext context)
Subclasses should return a new View instance of the proper type. Map<String, Integer>
getCommandsMap()
Subclasses of ViewManager that expect to receive commands through should override this method returning the mapbetween names of the commands and IDs that are then used in receiveCommand methodwhenever the command is dispatched for this particular ViewManager. void
receiveCommand(ReactViewGroup root, int commandId, @Nullable() ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the . void
receiveCommand(ReactViewGroup root, String commandId, @Nullable() ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the . -
Methods inherited from class com.facebook.react.views.view.ReactClippingViewManager
addView, getChildAt, getChildCount, removeAllViews, removeViewAt, setRemoveClippedSubviews
-
Methods inherited from class com.facebook.react.uimanager.ViewGroupManager
addViews, createShadowNodeInstance, getShadowNodeClass, getViewZIndex, needsCustomLayoutForChildren, removeView, setViewZIndex, shouldPromoteGrandchildren, updateExtraData
-
Methods inherited from class com.facebook.react.uimanager.BaseViewManager
getExportedCustomBubblingEventTypeConstants, getExportedCustomDirectEventTypeConstants, setAccessibilityActions, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLabelledBy, setAccessibilityLiveRegion, setAccessibilityRole, setAccessibilityValue, setBackgroundColor, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderRadius, setBorderTopLeftRadius, setBorderTopRightRadius, setElevation, setImportantForAccessibility, setMoveShouldSetResponder, setMoveShouldSetResponderCapture, setNativeId, setOpacity, setPointerEnter, setPointerLeave, setPointerMove, setRenderToHardwareTexture, setResponderEnd, setResponderGrant, setResponderMove, setResponderReject, setResponderRelease, setResponderStart, setResponderTerminate, setResponderTerminationRequest, setRotation, setScaleX, setScaleY, setShadowColor, setShouldBlockNativeResponder, setStartShouldSetResponder, setStartShouldSetResponderCapture, setTestId, setTouchCancel, setTouchEnd, setTouchMove, setTouchStart, setTransform, setTranslateX, setTranslateY, setViewState, setZIndex
-
Methods inherited from class com.facebook.react.uimanager.ViewManager
createShadowNodeInstance, createShadowNodeInstance, createView, getExportedViewConstants, getNativeProps, getShadowNodeClass, measure, measure, onDropViewInstance, receiveCommand, receiveCommand, setPadding, updateExtraData, updateProperties, updateState
-
Methods inherited from class com.facebook.react.bridge.BaseJavaModule
canOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroy
-
Methods inherited from class com.facebook.react.uimanager.BaseViewManagerInterface
setAccessibilityActions, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLabelledBy, setAccessibilityLiveRegion, setAccessibilityRole, setBackgroundColor, setElevation, setImportantForAccessibility, setNativeId, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setShadowColor, setTestId, setTransform, setTranslateX, setTranslateY, setViewState, setZIndex
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
setAccessible
void setAccessible(ReactViewGroup view, boolean accessible)
-
setTVPreferredFocus
void setTVPreferredFocus(ReactViewGroup view, boolean hasTVPreferredFocus)
-
nextFocusDown
void nextFocusDown(ReactViewGroup view, int viewId)
-
nextFocusForward
void nextFocusForward(ReactViewGroup view, int viewId)
-
nextFocusLeft
void nextFocusLeft(ReactViewGroup view, int viewId)
-
nextFocusRight
void nextFocusRight(ReactViewGroup view, int viewId)
-
nextFocusUp
void nextFocusUp(ReactViewGroup view, int viewId)
-
setBorderRadius
void setBorderRadius(ReactViewGroup view, int index, float borderRadius)
-
setBorderStyle
void setBorderStyle(ReactViewGroup view, @Nullable() String borderStyle)
-
setHitSlop
void setHitSlop(ReactViewGroup view, Dynamic hitSlop)
-
setPointerEvents
void setPointerEvents(ReactViewGroup view, @Nullable() String pointerEventsStr)
-
setNativeBackground
void setNativeBackground(ReactViewGroup view, @Nullable() ReadableMap bg)
-
setNativeForeground
void setNativeForeground(ReactViewGroup view, @Nullable() ReadableMap fg)
-
setNeedsOffscreenAlphaCompositing
void setNeedsOffscreenAlphaCompositing(ReactViewGroup view, boolean needsOffscreenAlphaCompositing)
-
setBorderWidth
void setBorderWidth(ReactViewGroup view, int index, float width)
-
setBorderColor
void setBorderColor(ReactViewGroup view, int index, Integer color)
-
setCollapsable
void setCollapsable(ReactViewGroup view, boolean collapsable)
-
setFocusable
void setFocusable(ReactViewGroup view, boolean focusable)
-
setOverflow
void setOverflow(ReactViewGroup view, String overflow)
-
setBackfaceVisibility
void setBackfaceVisibility(ReactViewGroup view, String backfaceVisibility)
-
setOpacity
void setOpacity(@NonNull() ReactViewGroup view, float opacity)
-
setTransform
void setTransform(@NonNull() ReactViewGroup view, @Nullable() ReadableArray matrix)
-
createViewInstance
ReactViewGroup createViewInstance(ThemedReactContext context)
Subclasses should return a new View instance of the proper type.
-
getCommandsMap
Map<String, Integer> getCommandsMap()
Subclasses of ViewManager that expect to receive commands through should override this method returning the mapbetween names of the commands and IDs that are then used in receiveCommand methodwhenever the command is dispatched for this particular ViewManager.
-
receiveCommand
void receiveCommand(ReactViewGroup root, int commandId, @Nullable() ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the . Good example of such a command would be
{@code scrollTo}
request with coordinatesfor a ScrollView instance.This method is deprecated use receiveCommand instead.
- Parameters:
root
- View instance that should receive the commandcommandId
- code of the commandargs
- optional arguments for the command
-
receiveCommand
void receiveCommand(ReactViewGroup root, String commandId, @Nullable() ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the . Good example of such a command would be
{@code scrollTo}
request with coordinatesfor a ReactScrollView instance.- Parameters:
root
- View instance that should receive the commandcommandId
- code of the commandargs
- optional arguments for the command
-
-
-
-