Browse Source

fixed blank nav bar titles on Android when title font size not set. (#1516)

Justin Stanley 7 years ago
parent
commit
0fbb067e09

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

@@ -151,12 +151,11 @@ public class TitleBar extends Toolbar {
151 151
     }
152 152
 
153 153
     protected void setTitleTextFontSize(StyleParams params) {
154
-        if (params.titleBarTitleFontSize == -1) {
155
-            return;
156
-        }
157
-        View titleView = getTitleView();
158
-        if (titleView instanceof TextView) {
159
-            ((TextView) titleView).setTextSize(((float) params.titleBarTitleFontSize));
154
+        if (params.titleBarTitleFontSize > 0) {
155
+            View titleView = getTitleView();
156
+            if (titleView instanceof TextView) {
157
+                ((TextView) titleView).setTextSize(((float) params.titleBarTitleFontSize));
158
+            }
160 159
         }
161 160
     }
162 161