-
- All Implemented Interfaces:
-
com.facebook.react.bridge.NativeModule
,com.facebook.react.uimanager.BaseViewManagerInterface
,com.facebook.react.uimanager.IViewManagerWithChildren
,com.facebook.react.viewmanagers.ModalHostViewManagerInterface
public class ReactModalHostManager extends ViewGroupManager<ReactModalHostView> implements ModalHostViewManagerInterface<ReactModalHostView>
View manager for ReactModalHostView components.
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
REACT_CLASS
-
Constructor Summary
Constructors Constructor Description ReactModalHostManager()
-
Method Summary
Modifier and Type Method Description String
getName()
LayoutShadowNode
createShadowNodeInstance()
This method should return a subclass of ReactShadowNode which will be then used formeasuring position and size of the view. Class<out LayoutShadowNode>
getShadowNodeClass()
This method should return Class instance that represent type of shadow node that thismanager will return from createShadowNodeInstance. void
onDropViewInstance(ReactModalHostView view)
Called when view is detached from view hierarchy and allows for some additional cleanup by the ViewManager subclass. void
setAnimationType(ReactModalHostView view, @Nullable() String animationType)
void
setTransparent(ReactModalHostView view, boolean transparent)
void
setStatusBarTranslucent(ReactModalHostView view, boolean statusBarTranslucent)
void
setHardwareAccelerated(ReactModalHostView view, boolean hardwareAccelerated)
void
setVisible(ReactModalHostView view, boolean visible)
void
setPresentationStyle(ReactModalHostView view, @Nullable() String value)
void
setAnimated(ReactModalHostView view, boolean value)
void
setSupportedOrientations(ReactModalHostView view, @Nullable() ReadableArray value)
void
setIdentifier(ReactModalHostView view, int value)
Map<String, Object>
getExportedCustomDirectEventTypeConstants()
Returns a map of config data passed to JS that defines eligible events that can be placed onnative views. Object
updateState(ReactModalHostView view, ReactStylesDiffMap props, @Nullable() StateWrapper stateWrapper)
Subclasses can implement this method to receive state updates shared between all instances ofthis component type. ViewManagerDelegate<ReactModalHostView>
getDelegate()
Override this method and return an instance of ViewManagerDelegate if the props of theview managed by this view manager should be set via this delegate. -
Methods inherited from class com.facebook.react.uimanager.ViewGroupManager
addView, addViews, getChildAt, getChildCount, getViewZIndex, needsCustomLayoutForChildren, removeAllViews, removeView, removeViewAt, setViewZIndex, shouldPromoteGrandchildren, updateExtraData
-
Methods inherited from class com.facebook.react.uimanager.BaseViewManager
getExportedCustomBubblingEventTypeConstants, 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, getCommandsMap, 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 com.facebook.react.viewmanagers.ModalHostViewManagerInterface
setAnimated, setAnimationType, setHardwareAccelerated, setIdentifier, setPresentationStyle, setStatusBarTranslucent, setSupportedOrientations, setTransparent, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
createShadowNodeInstance
LayoutShadowNode createShadowNodeInstance()
This method should return a subclass of ReactShadowNode which will be then used formeasuring position and size of the view. In most of the cases this should just return aninstance of ReactShadowNode
-
getShadowNodeClass
Class<out LayoutShadowNode> getShadowNodeClass()
This method should return Class instance that represent type of shadow node that thismanager will return from createShadowNodeInstance.
This method will be used in the bridge initialization phase to collect properties exposedusing ReactProp (or ReactPropGroup) annotation from the ReactShadowNode subclass specific for native view this manager provides.
-
onDropViewInstance
void onDropViewInstance(ReactModalHostView view)
Called when view is detached from view hierarchy and allows for some additional cleanup by the ViewManager subclass.
-
setAnimationType
void setAnimationType(ReactModalHostView view, @Nullable() String animationType)
-
setTransparent
void setTransparent(ReactModalHostView view, boolean transparent)
-
setStatusBarTranslucent
void setStatusBarTranslucent(ReactModalHostView view, boolean statusBarTranslucent)
-
setHardwareAccelerated
void setHardwareAccelerated(ReactModalHostView view, boolean hardwareAccelerated)
-
setVisible
void setVisible(ReactModalHostView view, boolean visible)
-
setPresentationStyle
void setPresentationStyle(ReactModalHostView view, @Nullable() String value)
-
setAnimated
void setAnimated(ReactModalHostView view, boolean value)
-
setSupportedOrientations
void setSupportedOrientations(ReactModalHostView view, @Nullable() ReadableArray value)
-
setIdentifier
void setIdentifier(ReactModalHostView view, int value)
-
getExportedCustomDirectEventTypeConstants
Map<String, Object> getExportedCustomDirectEventTypeConstants()
Returns a map of config data passed to JS that defines eligible events that can be placed onnative views. This should return non-bubbling directly-dispatched event types.
Returned map should be of the form:
{ "onTwirl": { "registrationName": "onTwirl" } }
-
updateState
Object updateState(ReactModalHostView view, ReactStylesDiffMap props, @Nullable() StateWrapper stateWrapper)
Subclasses can implement this method to receive state updates shared between all instances ofthis component type.
-
getDelegate
ViewManagerDelegate<ReactModalHostView> getDelegate()
Override this method and return an instance of ViewManagerDelegate if the props of theview managed by this view manager should be set via this delegate. The provided instance willthen get calls to setProperty for every propthat must be updated and it's the delegate's responsibility to apply these values to the view.
By default this method returns
{@code null}
, which means that the view manager doesn't havea delegate and the view props should be set internally by the view manager itself.
-
-
-
-