Browse Source

Use INVISIBLE to hide screens so they get measured on creation

Guy Carmeli 8 years ago
parent
commit
575ff70a1b

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

@@ -49,7 +49,7 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
49 49
     private void createAndAddScreenStack(int position) {
50 50
         ScreenStack newStack = new ScreenStack(activity, params.tabParams.get(position));
51 51
         screenStacks[position] = newStack;
52
-        newStack.setVisibility(GONE);
52
+        newStack.setVisibility(INVISIBLE);
53 53
         addView(newStack, 0, new LayoutParams(MATCH_PARENT, MATCH_PARENT));
54 54
     }
55 55
 
@@ -170,7 +170,7 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
170 170
 
171 171
     private void hideCurrentStack() {
172 172
         ScreenStack currentScreenStack = getCurrentScreenStack();
173
-        currentScreenStack.setVisibility(GONE);
173
+        currentScreenStack.setVisibility(INVISIBLE);
174 174
     }
175 175
 
176 176
     private ScreenStack getCurrentScreenStack() {