public class ReactModalHostManager extends ViewGroupManager<ReactModalHostView> implements ModalHostViewManagerInterface<ReactModalHostView>
ReactModalHostView
components.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 |
---|
ReactModalHostManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
addEventEmitters(ThemedReactContext reactContext,
ReactModalHostView view)
Subclasses can override this method to install custom event emitters on the given View.
|
LayoutShadowNode |
createShadowNodeInstance()
This method should return a subclass of
ReactShadowNode which will be then used for
measuring position and size of the view. |
protected ReactModalHostView |
createViewInstance(ThemedReactContext reactContext)
Subclasses should return a new View instance of the proper type.
|
ViewManagerDelegate<ReactModalHostView> |
getDelegate()
Override this method and return an instance of
ViewManagerDelegate if the props of the
view managed by this view manager should be set via this delegate. |
java.util.Map<java.lang.String,java.lang.Object> |
getExportedCustomDirectEventTypeConstants()
Returns a map of config data passed to JS that defines eligible events that can be placed on
native views.
|
java.lang.String |
getName() |
java.lang.Class<? extends LayoutShadowNode> |
getShadowNodeClass()
This method should return
Class instance that represent type of shadow node that this
manager will return from ViewManager.createShadowNodeInstance() . |
protected void |
onAfterUpdateTransaction(ReactModalHostView view)
Callback that will be triggered after all properties are updated in current update transaction
(all @ReactProp handlers for properties updated in current transaction have been called).
|
void |
onDropViewInstance(ReactModalHostView view)
Called when view is detached from view hierarchy and allows for some additional cleanup by the
ViewManager subclass. |
void |
setAnimated(ReactModalHostView view,
boolean value) |
void |
setAnimationType(ReactModalHostView view,
java.lang.String animationType) |
void |
setHardwareAccelerated(ReactModalHostView view,
boolean hardwareAccelerated) |
void |
setIdentifier(ReactModalHostView view,
int value) |
void |
setPresentationStyle(ReactModalHostView view,
java.lang.String value) |
void |
setStatusBarTranslucent(ReactModalHostView view,
boolean statusBarTranslucent) |
void |
setSupportedOrientations(ReactModalHostView view,
ReadableArray value) |
void |
setTransparent(ReactModalHostView view,
boolean transparent) |
java.lang.Object |
updateState(ReactModalHostView view,
ReactStylesDiffMap props,
StateWrapper stateWrapper)
Subclasses can implement this method to receive state updates shared between all instances of
this component type.
|
addView, addViews, getChildAt, getChildCount, getViewZIndex, needsCustomLayoutForChildren, removeAllViews, removeView, removeViewAt, setViewZIndex, shouldPromoteGrandchildren, updateExtraData
setAccessibilityActions, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLiveRegion, setAccessibilityRole, setAccessibilityValue, setBackgroundColor, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderRadius, setBorderTopLeftRadius, setBorderTopRightRadius, setElevation, setImportantForAccessibility, setNativeId, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setTestId, setTransform, setTranslateX, setTranslateY, setViewState, setZIndex
createShadowNodeInstance, createView, createViewInstance, getCommandsMap, getExportedCustomBubblingEventTypeConstants, getExportedViewConstants, getNativeProps, measure, receiveCommand, receiveCommand, setPadding, updateLocalData, updateProperties
canOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroy
public static final java.lang.String REACT_CLASS
public java.lang.String getName()
getName
in interface NativeModule
getName
in class ViewManager<ReactModalHostView,LayoutShadowNode>
protected ReactModalHostView createViewInstance(ThemedReactContext reactContext)
ViewManager
createViewInstance
in class ViewManager<ReactModalHostView,LayoutShadowNode>
public LayoutShadowNode createShadowNodeInstance()
ViewManager
ReactShadowNode
which will be then used for
measuring position and size of the view. In most of the cases this should just return an
instance of ReactShadowNode
createShadowNodeInstance
in class ViewGroupManager<ReactModalHostView>
public java.lang.Class<? extends LayoutShadowNode> getShadowNodeClass()
ViewManager
Class
instance that represent type of shadow node that this
manager will return from ViewManager.createShadowNodeInstance()
.
This method will be used in the bridge initialization phase to collect properties exposed
using ReactProp
(or ReactPropGroup
) annotation from the ReactShadowNode
subclass specific for native view this manager provides.
getShadowNodeClass
in class ViewGroupManager<ReactModalHostView>
Class
object that represents type of shadow node used by this view manager.public void onDropViewInstance(ReactModalHostView view)
ViewManager
ViewManager
subclass.onDropViewInstance
in class ViewManager<ReactModalHostView,LayoutShadowNode>
public void setAnimationType(ReactModalHostView view, java.lang.String animationType)
setAnimationType
in interface ModalHostViewManagerInterface<ReactModalHostView>
public void setTransparent(ReactModalHostView view, boolean transparent)
setTransparent
in interface ModalHostViewManagerInterface<ReactModalHostView>
public void setStatusBarTranslucent(ReactModalHostView view, boolean statusBarTranslucent)
setStatusBarTranslucent
in interface ModalHostViewManagerInterface<ReactModalHostView>
public void setHardwareAccelerated(ReactModalHostView view, boolean hardwareAccelerated)
setHardwareAccelerated
in interface ModalHostViewManagerInterface<ReactModalHostView>
public void setPresentationStyle(ReactModalHostView view, java.lang.String value)
setPresentationStyle
in interface ModalHostViewManagerInterface<ReactModalHostView>
public void setAnimated(ReactModalHostView view, boolean value)
setAnimated
in interface ModalHostViewManagerInterface<ReactModalHostView>
public void setSupportedOrientations(ReactModalHostView view, ReadableArray value)
setSupportedOrientations
in interface ModalHostViewManagerInterface<ReactModalHostView>
public void setIdentifier(ReactModalHostView view, int value)
setIdentifier
in interface ModalHostViewManagerInterface<ReactModalHostView>
protected void addEventEmitters(ThemedReactContext reactContext, ReactModalHostView view)
ViewManager
addEventEmitters
in class ViewManager<ReactModalHostView,LayoutShadowNode>
public java.util.Map<java.lang.String,java.lang.Object> getExportedCustomDirectEventTypeConstants()
ViewManager
Returned map should be of the form:
{ "onTwirl": { "registrationName": "onTwirl" } }
getExportedCustomDirectEventTypeConstants
in class BaseViewManager<ReactModalHostView,LayoutShadowNode>
protected void onAfterUpdateTransaction(ReactModalHostView view)
ViewManager
onAfterUpdateTransaction
in class BaseViewManager<ReactModalHostView,LayoutShadowNode>
public java.lang.Object updateState(ReactModalHostView view, ReactStylesDiffMap props, StateWrapper stateWrapper)
ViewManager
updateState
in class ViewManager<ReactModalHostView,LayoutShadowNode>
public ViewManagerDelegate<ReactModalHostView> getDelegate()
ViewManager
ViewManagerDelegate
if the props of the
view managed by this view manager should be set via this delegate. The provided instance will
then get calls to ViewManagerDelegate.setProperty(View, String, Object)
for every prop
that must be updated and it's the delegate's responsibility to apply these values to the view.
By default this method returns null
, which means that the view manager doesn't have
a delegate and the view props should be set internally by the view manager itself.
getDelegate
in class ViewManager<ReactModalHostView,LayoutShadowNode>
ViewManagerDelegate
if the props of the view managed by this
view manager should be set via this delegate