Browse Source

drawUnderStatusBar changes

* Resolve default value through appStyle
* breaking - titleBarTopPadding is now dp instead of pixels
Guy Carmeli 7 years ago
parent
commit
dcb4e505ba

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

130
         result.topTabTextFontFamily = new StyleParams.Font();
130
         result.topTabTextFontFamily = new StyleParams.Font();
131
         result.titleBarHeight = -1;
131
         result.titleBarHeight = -1;
132
         result.screenAnimationType = "slide-up";
132
         result.screenAnimationType = "slide-up";
133
+        result.drawUnderStatusBar = false;
133
         return result;
134
         return result;
134
     }
135
     }
135
 
136
 

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/views/TitleBar.java View File

136
     }
136
     }
137
 
137
 
138
     private void setTopPadding(final StyleParams params) {
138
     private void setTopPadding(final StyleParams params) {
139
-        setPadding(0, params.titleBarTopPadding, 0,0);
139
+        setPadding(0, (int) ViewUtils.convertDpToPixel(params.titleBarTopPadding), 0,0);
140
     }
140
     }
141
 
141
 
142
     private void colorOverflowButton(StyleParams params) {
142
     private void colorOverflowButton(StyleParams params) {

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

149
     statusBarColor: processColor(originalStyleObject.statusBarColor),
149
     statusBarColor: processColor(originalStyleObject.statusBarColor),
150
     statusBarHidden: originalStyleObject.statusBarHidden,
150
     statusBarHidden: originalStyleObject.statusBarHidden,
151
     statusBarTextColorScheme: originalStyleObject.statusBarTextColorScheme,
151
     statusBarTextColorScheme: originalStyleObject.statusBarTextColorScheme,
152
-    drawUnderStatusBar: originalStyleObject.drawUnderStatusBar || false,
152
+    drawUnderStatusBar: originalStyleObject.drawUnderStatusBar,
153
     topBarReactView: originalStyleObject.navBarCustomView,
153
     topBarReactView: originalStyleObject.navBarCustomView,
154
     topBarReactViewAlignment: originalStyleObject.navBarComponentAlignment,
154
     topBarReactViewAlignment: originalStyleObject.navBarComponentAlignment,
155
     topBarReactViewInitialProps: originalStyleObject.navBarCustomViewInitialProps,
155
     topBarReactViewInitialProps: originalStyleObject.navBarCustomViewInitialProps,