소스 검색

Toggle bottom tabs after popToRoot

Guy Carmeli 8 년 전
부모
커밋
31d7ed4eb6
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7
    1
      android/app/src/main/java/com/reactnativenavigation/activities/BottomTabActivity.java

+ 7
- 1
android/app/src/main/java/com/reactnativenavigation/activities/BottomTabActivity.java 파일 보기

@@ -150,7 +150,13 @@ public class BottomTabActivity extends BaseReactActivity implements AHBottomNavi
150 150
         for (ScreenStack stack : mScreenStacks) {
151 151
             if (stack.peek().navigatorId.equals(navigatorId)) {
152 152
                 Screen popped = stack.popToRoot();
153
-                StyleHelper.updateStyles(mToolbar, getCurrentScreen());
153
+                Screen currentScreen = getCurrentScreen();
154
+                StyleHelper.updateStyles(mToolbar, currentScreen);
155
+
156
+                if (shouldToggleTabs(currentScreen)) {
157
+                    toggleTabs(currentScreen.bottomTabsHidden, false);
158
+                }
159
+
154 160
                 return popped;
155 161
             }
156 162
         }