Bladeren bron

Update navigatorStyle when toggling BottomTabs

When toggleTabs was called, the visibility state of the BottomTabs
was not persisted. There for, when pushing a screen and popping
the BottomTabs visibility state was set to the value of bottomTabsHidden
from navigatorStyle.
Guy Carmeli 7 jaren geleden
bovenliggende
commit
79d0e4c483

+ 1
- 0
android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java Bestand weergeven

@@ -179,6 +179,7 @@ public class BottomTabsLayout extends BaseLayout implements AHBottomNavigation.O
179 179
     }
180 180
 
181 181
     public void setBottomTabsVisible(boolean hidden, boolean animated) {
182
+        getCurrentScreenStack().peek().updateBottomTabsVisibility(hidden);
182 183
         bottomTabs.setVisibility(hidden, animated);
183 184
     }
184 185
 

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/screens/Screen.java Bestand weergeven

@@ -115,6 +115,10 @@ public abstract class Screen extends RelativeLayout implements Subscriber {
115 115
         }
116 116
     }
117 117
 
118
+    public void updateBottomTabsVisibility(boolean hidden) {
119
+        styleParams.bottomTabsHidden = hidden;
120
+    }
121
+
118 122
     private void createViews() {
119 123
         createAndAddTopBar();
120 124
         createTitleBar();