public class ReactToolbarManager extends ViewGroupManager<ReactToolbar>
NativeModule.NativeMethodPROP_NATIVE_ID, PROP_TEST_IDMETHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC| Constructor and Description |
|---|
ReactToolbarManager() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEventEmitters(ThemedReactContext reactContext,
ReactToolbar view)
Subclasses can override this method to install custom event emitters on the given View.
|
protected ReactToolbar |
createViewInstance(ThemedReactContext reactContext)
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, 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> |
getExportedViewConstants()
Returns a map of view-specific constants that are injected to JavaScript.
|
java.lang.String |
getName() |
boolean |
needsCustomLayoutForChildren()
Returns whether this View type needs to handle laying out its own children instead of
deferring to the standard css-layout algorithm.
|
void |
receiveCommand(ReactToolbar view,
int commandType,
ReadableArray args)
Subclasses may use this method to receive events/commands directly from JS through the
UIManager. |
void |
setActions(ReactToolbar view,
ReadableArray actions) |
void |
setContentInsetEnd(ReactToolbar view,
float insetEnd) |
void |
setContentInsetStart(ReactToolbar view,
float insetStart) |
void |
setLogo(ReactToolbar view,
ReadableMap logo) |
void |
setNavIcon(ReactToolbar view,
ReadableMap navIcon) |
void |
setOverflowIcon(ReactToolbar view,
ReadableMap overflowIcon) |
void |
setRtl(ReactToolbar view,
boolean rtl) |
void |
setSubtitle(ReactToolbar view,
java.lang.String subtitle) |
void |
setSubtitleColor(ReactToolbar view,
java.lang.Integer subtitleColor) |
void |
setTitle(ReactToolbar view,
java.lang.String title) |
void |
setTitleColor(ReactToolbar view,
java.lang.Integer titleColor) |
addView, addViews, createShadowNodeInstance, getChildAt, getChildCount, getShadowNodeClass, getViewZIndex, removeAllViews, removeView, removeViewAt, setViewZIndex, shouldPromoteGrandchildren, updateExtraDataonAfterUpdateTransaction, setAccessibilityComponentType, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLiveRegion, setAccessibilityRole, setBackgroundColor, setElevation, setImportantForAccessibility, setNativeId, setOpacity, setRenderToHardwareTexture, setRotation, setScaleX, setScaleY, setTestId, setTransform, setTranslateX, setTranslateY, setViewStates, setZIndexcreateShadowNodeInstance, createView, getExportedCustomBubblingEventTypeConstants, getExportedCustomDirectEventTypeConstants, getNativeProps, measure, onDropViewInstance, updateLocalData, updatePropertiescanOverrideExistingModule, getConstants, hasConstants, initialize, onCatalystInstanceDestroypublic java.lang.String getName()
getName in interface NativeModulegetName in class ViewManager<ReactToolbar,LayoutShadowNode>protected ReactToolbar createViewInstance(ThemedReactContext reactContext)
ViewManagercreateViewInstance in class ViewManager<ReactToolbar,LayoutShadowNode>public void setLogo(ReactToolbar view, ReadableMap logo)
public void setNavIcon(ReactToolbar view, ReadableMap navIcon)
public void setOverflowIcon(ReactToolbar view, ReadableMap overflowIcon)
public void setRtl(ReactToolbar view, boolean rtl)
public void setSubtitle(ReactToolbar view, java.lang.String subtitle)
public void setSubtitleColor(ReactToolbar view, java.lang.Integer subtitleColor)
public void setTitle(ReactToolbar view, java.lang.String title)
public void setTitleColor(ReactToolbar view, java.lang.Integer titleColor)
public void setContentInsetStart(ReactToolbar view, float insetStart)
public void setContentInsetEnd(ReactToolbar view, float insetEnd)
public void setActions(ReactToolbar view, ReadableArray actions)
protected void addEventEmitters(ThemedReactContext reactContext, ReactToolbar view)
ViewManageraddEventEmitters in class ViewManager<ReactToolbar,LayoutShadowNode>public java.util.Map<java.lang.String,java.lang.Object> getExportedViewConstants()
ViewManagergetExportedViewConstants in class ViewManager<ReactToolbar,LayoutShadowNode>public boolean needsCustomLayoutForChildren()
ViewGroupManagerneedsCustomLayoutForChildren in class ViewGroupManager<ReactToolbar>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.
As an example we may consider ReactWebViewManager that expose the following commands:
goBack, goForward, reload. In this case the map returned from ViewManager.getCommandsMap() from
ReactWebViewManager will look as follows:
{
"goBack": 1,
"goForward": 2,
"reload": 3,
}
Now assuming that "reload" command is dispatched through UIManagerModule we trigger
ReactWebViewManager#receiveCommand passing "3" as commandId argument.getCommandsMap in class ViewManager<ReactToolbar,LayoutShadowNode>public void receiveCommand(ReactToolbar view, int commandType, ReadableArray args)
ViewManagerUIManager. Good example of such a command would be scrollTo request with
coordinates for a ScrollView or goBack request for a WebView instance.receiveCommand in class ViewManager<ReactToolbar,LayoutShadowNode>view - View instance that should receive the commandcommandType - code of the commandargs - optional arguments for the command