use of com.reactnativenavigation.viewcontrollers.viewcontroller.overlay.RootOverlay in project react-native-navigation by wix.
the class Navigator method setRoot.
public void setRoot(final ViewController<?> appearing, CommandListener commandListener, ReactInstanceManager reactInstanceManager) {
previousRoot = root;
modalStack.destroy();
final boolean removeSplashView = isRootNotCreated();
if (isRootNotCreated())
getView();
final ViewController<?> disappearing = previousRoot;
root = appearing;
root.setOverlay(new RootOverlay(getActivity(), contentLayout));
root.setParentController(this);
rootPresenter.setRoot(appearing, disappearing, defaultOptions, new CommandListenerAdapter(commandListener) {
@Override
public void onSuccess(String childId) {
root.onViewDidAppear();
if (removeSplashView)
contentLayout.removeViewAt(0);
destroyPreviousRoot();
super.onSuccess(childId);
}
}, reactInstanceManager);
}
Aggregations