Browse Source

Add root once

Guy Carmeli 6 years ago
parent
commit
32bf636d1d

+ 1
- 2
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/Navigator.java View File

78
         View view = viewController.getView();
78
         View view = viewController.getView();
79
 
79
 
80
         AnimationsOptions animationsOptions = viewController.options.animationsOptions;
80
         AnimationsOptions animationsOptions = viewController.options.animationsOptions;
81
+        getView().addView(view);
81
         if (animationsOptions.startApp.hasValue()) {
82
         if (animationsOptions.startApp.hasValue()) {
82
-            getView().addView(view);
83
             new NavigationAnimator(viewController.getActivity(), animationsOptions)
83
             new NavigationAnimator(viewController.getActivity(), animationsOptions)
84
                     .animateStartApp(view, new AnimatorListenerAdapter() {
84
                     .animateStartApp(view, new AnimatorListenerAdapter() {
85
                         @Override
85
                         @Override
88
                         }
88
                         }
89
                     });
89
                     });
90
         } else {
90
         } else {
91
-            getView().addView(view);
92
             promise.resolve(viewController.getId());
91
             promise.resolve(viewController.getId());
93
         }
92
         }
94
     }
93
     }