Browse Source

Add drawUnderTopBar style param

Guy Carmeli 8 years ago
parent
commit
755dc4350f

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

55
     private void addContentView() {
55
     private void addContentView() {
56
         contentView = new ContentView(getContext(), screenParams, this);
56
         contentView = new ContentView(getContext(), screenParams, this);
57
         RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT);
57
         RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT);
58
-        params.addRule(RelativeLayout.BELOW, topBar.getId());
58
+        if (!screenParams.styleParams.drawUnderTopBar) {
59
+            params.addRule(RelativeLayout.BELOW, topBar.getId());
60
+        }
59
         addView(contentView, params);
61
         addView(contentView, params);
60
         contentView.init();
62
         contentView.init();
61
     }
63
     }

+ 1
- 0
android/app/src/main/java/com/reactnativenavigation/params/ScreenStyleParams.java View File

32
     public boolean topTabsHidden;
32
     public boolean topTabsHidden;
33
     public boolean bottomTabsHidden;
33
     public boolean bottomTabsHidden;
34
     public boolean bottomTabsHiddenOnScroll;
34
     public boolean bottomTabsHiddenOnScroll;
35
+    public boolean drawUnderTopBar;
35
 }
36
 }

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

19
         result.topTabsHidden = params.getBoolean("topTabsHidden");
19
         result.topTabsHidden = params.getBoolean("topTabsHidden");
20
         result.bottomTabsHidden = params.getBoolean("bottomTabsHidden");
20
         result.bottomTabsHidden = params.getBoolean("bottomTabsHidden");
21
         result.bottomTabsHiddenOnScroll = params.getBoolean("bottomTabsHiddenOnScroll");
21
         result.bottomTabsHiddenOnScroll = params.getBoolean("bottomTabsHiddenOnScroll");
22
+        result.drawUnderTopBar = params.getBoolean("drawUnderTopBar", false);
22
         return result;
23
         return result;
23
     }
24
     }
24
 }
25
 }

+ 2
- 1
src/deprecated/platformSpecificDeprecated.android.js View File

90
     backButtonHidden: navigatorStyle.backButtonHidden,
90
     backButtonHidden: navigatorStyle.backButtonHidden,
91
     topTabsHidden: navigatorStyle.topTabsHidden,
91
     topTabsHidden: navigatorStyle.topTabsHidden,
92
     bottomTabsHidden: navigatorStyle.tabBarHidden,
92
     bottomTabsHidden: navigatorStyle.tabBarHidden,
93
-    bottomTabsHiddenOnScroll: navigatorStyle.bottomTabsHiddenOnScroll
93
+    bottomTabsHiddenOnScroll: navigatorStyle.bottomTabsHiddenOnScroll,
94
+    drawUnderTopBar: navigatorStyle.drawUnderNavBar
94
   };
95
   };
95
 
96
 
96
   return _.omit(screen, ['navigatorStyle']);
97
   return _.omit(screen, ['navigatorStyle']);