Browse Source

Draw screen under bottom tabs only if hideOnsScroll is true (#611)

Guy Carmeli 8 years ago
parent
commit
d9751720a7

+ 3
- 5
android/app/src/main/java/com/reactnativenavigation/params/parsers/StyleParamsParser.java View File

@@ -53,7 +53,9 @@ public class StyleParamsParser {
53 53
         result.bottomTabsHidden = getBoolean("bottomTabsHidden", getDefaultBottomTabsHidden());
54 54
         result.drawScreenAboveBottomTabs = !result.bottomTabsHidden &&
55 55
                                            params.getBoolean("drawScreenAboveBottomTabs", getDefaultDrawScreenAboveBottomTabs());
56
-        result.drawScreenAboveBottomTabs = drawScreenUnderBottomTabsIfTitleBarIsHiddenOnScroll(result);
56
+        if (result.titleBarHideOnScroll) {
57
+            result.drawScreenAboveBottomTabs = false;
58
+        }
57 59
         result.bottomTabsHiddenOnScroll = getBoolean("bottomTabsHiddenOnScroll", getDefaultBottomTabsHiddenOnScroll());
58 60
         result.bottomTabsColor = getColor("bottomTabsColor", getDefaultBottomTabsColor());
59 61
         result.bottomTabsButtonColor = getColor("bottomTabsButtonColor", getDefaultBottomTabsButtonColor());
@@ -76,10 +78,6 @@ public class StyleParamsParser {
76 78
         return result;
77 79
     }
78 80
 
79
-    private boolean drawScreenUnderBottomTabsIfTitleBarIsHiddenOnScroll(StyleParams result) {
80
-        return !result.titleBarHideOnScroll;
81
-    }
82
-
83 81
     private StyleParams.Color getDefaultContextualMenuStatusBarColor() {
84 82
         return new StyleParams.Color(Color.parseColor("#7c7c7c"));
85 83
     }