Browse Source

drawUnderStatusBar changes

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

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

@@ -130,6 +130,7 @@ public class StyleParamsParser {
130 130
         result.topTabTextFontFamily = new StyleParams.Font();
131 131
         result.titleBarHeight = -1;
132 132
         result.screenAnimationType = "slide-up";
133
+        result.drawUnderStatusBar = false;
133 134
         return result;
134 135
     }
135 136
 

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

@@ -136,7 +136,7 @@ public class TitleBar extends Toolbar {
136 136
     }
137 137
 
138 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 142
     private void colorOverflowButton(StyleParams params) {

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

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