Guy Carmeli před 8 roky
rodič
revize
f8af1bdaba

+ 4
- 4
android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java Zobrazit soubor

@@ -65,12 +65,12 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
65 65
 
66 66
     private void createAndAddScreens(int position) {
67 67
         ScreenParams screenParams = params.tabParams.get(position);
68
-        ScreenStack newStack = new ScreenStack(activity, getContentContainer(), screenParams.navigatorId, this);
68
+        ScreenStack newStack = new ScreenStack(activity, getScreenStackParent(), screenParams.navigatorId, this);
69 69
         newStack.pushInitialScreen(screenParams, createScreenLayoutParams(screenParams));
70 70
         screenStacks[position] = newStack;
71 71
     }
72 72
 
73
-    private RelativeLayout getContentContainer() {
73
+    private RelativeLayout getScreenStackParent() {
74 74
         return sideMenu == null ? this : sideMenu.getContentContainer();
75 75
     }
76 76
 
@@ -91,7 +91,7 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
91 91
     private void addBottomTabs() {
92 92
         LayoutParams lp = new LayoutParams(MATCH_PARENT, WRAP_CONTENT);
93 93
         lp.addRule(ALIGN_PARENT_BOTTOM);
94
-        getContentContainer().addView(bottomTabs, lp);
94
+        getScreenStackParent().addView(bottomTabs, lp);
95 95
     }
96 96
 
97 97
     private void showInitialScreenStack() {
@@ -197,7 +197,7 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
197 197
         currentScreenStack.destroy();
198 198
         removeView(currentScreenStack.peek());
199 199
 
200
-        ScreenStack newStack = new ScreenStack(activity, this, params.navigatorId, this);
200
+        ScreenStack newStack = new ScreenStack(activity, getScreenStackParent(), params.navigatorId, this);
201 201
         LayoutParams lp = createScreenLayoutParams(params);
202 202
         newStack.pushInitialScreen(params, lp);
203 203
         screenStacks[currentStackIndex] = newStack;

+ 0
- 1
android/app/src/main/java/com/reactnativenavigation/params/SideMenuParams.java Zobrazit soubor

@@ -6,5 +6,4 @@ public class SideMenuParams {
6 6
     public String screenId;
7 7
     public Bundle navigationParams;
8 8
     public boolean disableOpenGesture;
9
-    public Bundle passProps;
10 9
 }

+ 0
- 1
android/app/src/main/java/com/reactnativenavigation/params/parsers/SideMenuParamsParser.java Zobrazit soubor

@@ -11,7 +11,6 @@ public class SideMenuParamsParser extends Parser {
11 11
         result.screenId = sideMenu.getString("screenId");
12 12
         result.navigationParams = sideMenu.getBundle("navigationParams");
13 13
         result.disableOpenGesture = sideMenu.getBoolean("disableOpenGesture", false);
14
-        result.passProps = sideMenu.getBundle("passProps");
15 14
         return result;
16 15
     }
17 16
 }

+ 1
- 1
src/deprecated/platformSpecificDeprecated.android.js Zobrazit soubor

@@ -144,7 +144,7 @@ function convertDrawerParamsToSideMenuParams(drawerParams) {
144 144
   result.screenId = drawer.left.screen;
145 145
   addNavigatorParams(result);
146 146
   result = adaptNavigationParams(result);
147
-
147
+  result.passProps = drawer.passProps;
148 148
   return result;
149 149
 }
150 150
 

+ 4
- 0
src/platformSpecific.android.js Zobrazit soubor

@@ -78,6 +78,10 @@ function savePassProps(params) {
78 78
       savePassProps(tab);
79 79
     });
80 80
   }
81
+
82
+  if (params.sideMenu) {
83
+    PropRegistry.save(params.sideMenu.navigationParams.screenInstanceID, params.sideMenu.passProps);
84
+  }
81 85
 }
82 86
 
83 87
 function toggleSideMenuVisible(animated) {