use of com.reactnativenavigation.views.BehaviourDelegate in project react-native-navigation by wix.
the class ExternalComponentViewController method createView.
@Override
public ExternalComponentLayout createView() {
ExternalComponentLayout content = new ExternalComponentLayout(getActivity());
enableDrawingBehindStatusBar(content);
content.addView(componentCreator.create(getActivity(), reactInstanceManager, externalComponent.passProps).asView(), CoordinatorLayoutUtils.matchParentWithBehaviour(new BehaviourDelegate(this)));
return content;
}
use of com.reactnativenavigation.views.BehaviourDelegate in project react-native-navigation by wix.
the class RootPresenter method setRoot.
public void setRoot(ViewController appearingRoot, ViewController<?> disappearingRoot, Options defaultOptions, CommandListener listener, ReactInstanceManager reactInstanceManager) {
layoutDirectionApplier.apply(appearingRoot, defaultOptions, reactInstanceManager);
rootLayout.addView(appearingRoot.getView(), matchParentWithBehaviour(new BehaviourDelegate(appearingRoot)));
Options options = appearingRoot.resolveCurrentOptions(defaultOptions);
AnimationOptions enter = options.animations.setRoot.getEnter();
appearingRoot.setWaitForRender(enter.waitForRender);
if (enter.waitForRender.isTrue()) {
appearingRoot.getView().setAlpha(0);
appearingRoot.addOnAppearedListener(() -> {
if (appearingRoot.isDestroyed()) {
listener.onError("Could not set root - Waited for the view to become visible but it was destroyed");
} else {
appearingRoot.getView().setAlpha(1);
animateSetRootAndReportSuccess(appearingRoot, disappearingRoot, listener, options);
}
});
} else {
animateSetRootAndReportSuccess(appearingRoot, disappearingRoot, listener, options);
}
}
Aggregations