use of com.reactnativenavigation.options.LayoutNode in project react-native-navigation by wix.
the class NavigationModule method showOverlay.
@ReactMethod
public void showOverlay(String commandId, ReadableMap rawLayoutTree, Promise promise) {
final LayoutNode layoutTree = LayoutNodeParser.parse(jsonParser.parse(rawLayoutTree));
handle(() -> {
final ViewController<?> viewController = layoutFactory.create(layoutTree);
navigator().showOverlay(viewController, new NativeCommandListener("showOverlay", commandId, promise, eventEmitter, now));
});
}
use of com.reactnativenavigation.options.LayoutNode in project react-native-navigation by wix.
the class LayoutFactoryTest method component.
private LayoutNode component() throws JSONException {
final JSONObject component = new JSONObject();
final JSONObject layout = new JSONObject();
final JSONObject backgroundColor = new JSONObject();
backgroundColor.put("dark", 0);
backgroundColor.put("light", 1);
layout.put("backgroundColor", backgroundColor);
component.put("name", "com.component");
component.put("options", new JSONObject().put("layout", layout));
return new LayoutNode("Component1", LayoutNode.Type.Component, component, null);
}
Aggregations