Browse Source

Fix newStack crash

Guy Carmeli 8 years ago
parent
commit
86886d31f7

+ 2
- 2
android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java View File

@@ -228,12 +228,12 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
228 228
     @Override
229 229
     public void newStack(ScreenParams params) {
230 230
         ScreenStack currentScreenStack = getCurrentScreenStack();
231
-        currentScreenStack.destroy();
232 231
         removeView(currentScreenStack.peek());
232
+        currentScreenStack.destroy();
233 233
 
234 234
         ScreenStack newStack = new ScreenStack(activity, getScreenStackParent(), params.getNavigatorId(), this);
235 235
         LayoutParams lp = createScreenLayoutParams(params);
236
-        newStack.pushInitialScreen(params, lp);
236
+        newStack.pushInitialScreenWithAnimation(params, lp);
237 237
         screenStacks[currentStackIndex] = newStack;
238 238
 
239 239
         bottomTabs.setStyleFromScreen(params.styleParams);