Search in sources :

Example 1 with ContextualMenuParams

use of com.reactnativenavigation.params.ContextualMenuParams in project react-native-navigation by wix.

the class NavigationReactModule method showContextualMenu.

@ReactMethod
public void showContextualMenu(final String screenInstanceId, final ReadableMap params, final Callback onButtonClicked) {
    ContextualMenuParams contextualMenuParams = new ContextualMenuParamsParser().parse(BundleConverter.toBundle(params));
    NavigationCommandsHandler.showContextualMenu(screenInstanceId, contextualMenuParams, onButtonClicked);
}
Also used : ContextualMenuParams(com.reactnativenavigation.params.ContextualMenuParams) ContextualMenuParamsParser(com.reactnativenavigation.params.parsers.ContextualMenuParamsParser) ReactMethod(com.facebook.react.bridge.ReactMethod)

Example 2 with ContextualMenuParams

use of com.reactnativenavigation.params.ContextualMenuParams in project react-native-navigation by wix.

the class ContextualMenuParamsParser method parse.

public ContextualMenuParams parse(Bundle bundle) {
    ContextualMenuParams result = new ContextualMenuParams();
    result.buttons = new ContextualMenuButtonParamsParser().parseContextualMenuButtons(bundle.getBundle("buttons"));
    result.leftButton = new TitleBarLeftButtonParamsParser().parseSingleButton(bundle.getBundle("backButton"));
    result.navigationParams = new NavigationParams(bundle.getBundle("navigationParams"));
    return result;
}
Also used : ContextualMenuParams(com.reactnativenavigation.params.ContextualMenuParams) NavigationParams(com.reactnativenavigation.params.NavigationParams)

Aggregations

ContextualMenuParams (com.reactnativenavigation.params.ContextualMenuParams)2 ReactMethod (com.facebook.react.bridge.ReactMethod)1 NavigationParams (com.reactnativenavigation.params.NavigationParams)1 ContextualMenuParamsParser (com.reactnativenavigation.params.parsers.ContextualMenuParamsParser)1