Browse Source

Align fab after screen pop

Guy Carmeli 7 years ago
parent
commit
67db72fdb5

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

147
         if (getCurrentScreenStack().canPop()) {
147
         if (getCurrentScreenStack().canPop()) {
148
             getCurrentScreenStack().pop(true);
148
             getCurrentScreenStack().pop(true);
149
             setBottomTabsStyleFromCurrentScreen();
149
             setBottomTabsStyleFromCurrentScreen();
150
+            alignSnackbarContainerWithBottomTabs((LayoutParams) snackbarAndFabContainer.getLayoutParams(), getCurrentScreenStack().getCurrentScreenStyleParams());
150
             EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));
151
             EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));
151
             return true;
152
             return true;
152
         } else {
153
         } else {
347
             @Override
348
             @Override
348
             public void onScreenPopAnimationEnd() {
349
             public void onScreenPopAnimationEnd() {
349
                 setBottomTabsStyleFromCurrentScreen();
350
                 setBottomTabsStyleFromCurrentScreen();
350
-                alignSnackbarContainerWithBottomTabs((LayoutParams) snackbarAndFabContainer.getLayoutParams(), params.styleParams);
351
+                alignSnackbarContainerWithBottomTabs((LayoutParams) snackbarAndFabContainer.getLayoutParams(), getCurrentScreenStack().getCurrentScreenStyleParams());
351
                 EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));
352
                 EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));
352
             }
353
             }
353
         });
354
         });
507
                 @Override
508
                 @Override
508
                 public void onScreenPopAnimationEnd() {
509
                 public void onScreenPopAnimationEnd() {
509
                     setBottomTabsStyleFromCurrentScreen();
510
                     setBottomTabsStyleFromCurrentScreen();
511
+                    alignSnackbarContainerWithBottomTabs((LayoutParams) snackbarAndFabContainer.getLayoutParams(), getCurrentScreenStack().getCurrentScreenStyleParams());
510
                     EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));
512
                     EventBus.instance.post(new ScreenChangedEvent(getCurrentScreenStack().peek().getScreenParams()));
511
                 }
513
                 }
512
             });
514
             });

+ 1
- 2
android/app/src/main/java/com/reactnativenavigation/params/parsers/TitleBarButtonParamsParser.java View File

26
             result.icon = ImageLoader.loadImage(bundle.getString("icon"));
26
             result.icon = ImageLoader.loadImage(bundle.getString("icon"));
27
         }
27
         }
28
         result.color = getColor(bundle, "color", AppStyle.appStyle.titleBarButtonColor);
28
         result.color = getColor(bundle, "color", AppStyle.appStyle.titleBarButtonColor);
29
-        result.disabledColor =
30
-                getColor(bundle, "titleBarDisabledButtonColor", AppStyle.appStyle.titleBarDisabledButtonColor);
29
+        result.disabledColor = getColor(bundle, "titleBarDisabledButtonColor", AppStyle.appStyle.titleBarDisabledButtonColor);
31
         result.showAsAction = parseShowAsAction(bundle.getString("showAsAction"));
30
         result.showAsAction = parseShowAsAction(bundle.getString("showAsAction"));
32
         result.enabled = bundle.getBoolean("enabled", true);
31
         result.enabled = bundle.getBoolean("enabled", true);
33
         result.hint = bundle.getString("hint", "");
32
         result.hint = bundle.getString("hint", "");