|
@@ -3,10 +3,13 @@ package com.reactnativenavigation.viewcontrollers;
|
3
|
3
|
import android.app.Activity;
|
4
|
4
|
import android.support.annotation.NonNull;
|
5
|
5
|
import android.support.annotation.Nullable;
|
|
6
|
+import android.view.View;
|
6
|
7
|
import android.view.ViewGroup;
|
7
|
8
|
import android.widget.FrameLayout;
|
8
|
9
|
|
9
|
10
|
import com.facebook.react.bridge.Promise;
|
|
11
|
+import com.reactnativenavigation.anim.NavigationAnimator;
|
|
12
|
+import com.reactnativenavigation.parse.AnimationsOptions;
|
10
|
13
|
import com.reactnativenavigation.parse.Options;
|
11
|
14
|
import com.reactnativenavigation.presentation.NavigationOptionsListener;
|
12
|
15
|
import com.reactnativenavigation.presentation.OverlayManager;
|
|
@@ -66,8 +69,17 @@ public class Navigator extends ParentController implements ModalListener {
|
66
|
69
|
}
|
67
|
70
|
|
68
|
71
|
root = viewController;
|
69
|
|
- getView().addView(viewController.getView());
|
70
|
|
- promise.resolve(viewController.getId());
|
|
72
|
+ View view = viewController.getView();
|
|
73
|
+
|
|
74
|
+ AnimationsOptions animationsOptions = viewController.options.animationsOptions;
|
|
75
|
+ if (animationsOptions.startApp.hasValue()) {
|
|
76
|
+ getView().addView(view);
|
|
77
|
+ new NavigationAnimator(viewController.getActivity(), animationsOptions)
|
|
78
|
+ .animateStartApp(view, () -> promise.resolve(viewController.getId()));
|
|
79
|
+ } else {
|
|
80
|
+ getView().addView(view);
|
|
81
|
+ promise.resolve(viewController.getId());
|
|
82
|
+ }
|
71
|
83
|
}
|
72
|
84
|
|
73
|
85
|
public void setDefaultOptions(Options defaultOptions) {
|