|
@@ -5,9 +5,12 @@ import android.support.annotation.Nullable;
|
5
|
5
|
|
6
|
6
|
import com.reactnativenavigation.parse.params.Color;
|
7
|
7
|
import com.reactnativenavigation.parse.params.NullColor;
|
|
8
|
+import com.reactnativenavigation.parse.params.NullNumber;
|
8
|
9
|
import com.reactnativenavigation.parse.params.NullText;
|
|
10
|
+import com.reactnativenavigation.parse.params.Number;
|
9
|
11
|
import com.reactnativenavigation.parse.params.Text;
|
10
|
12
|
import com.reactnativenavigation.parse.parsers.ColorParser;
|
|
13
|
+import com.reactnativenavigation.parse.parsers.NumberParser;
|
11
|
14
|
import com.reactnativenavigation.parse.parsers.TextParser;
|
12
|
15
|
import com.reactnativenavigation.utils.TypefaceLoader;
|
13
|
16
|
|
|
@@ -28,6 +31,8 @@ public class BottomTabOptions {
|
28
|
31
|
options.badge = TextParser.parse(json, "badge");
|
29
|
32
|
options.testId = TextParser.parse(json, "testID");
|
30
|
33
|
options.fontFamily = typefaceManager.getTypeFace(json.optString("fontFamily", ""));
|
|
34
|
+ options.fontSize = NumberParser.parse(json, "fontSize");
|
|
35
|
+ options.selectedFontSize = NumberParser.parse(json, "selectedFontSize");
|
31
|
36
|
return options;
|
32
|
37
|
}
|
33
|
38
|
|
|
@@ -39,6 +44,8 @@ public class BottomTabOptions {
|
39
|
44
|
public Color selectedIconColor = new NullColor();
|
40
|
45
|
public Text testId = new NullText();
|
41
|
46
|
public Text badge = new NullText();
|
|
47
|
+ public Number fontSize = new NullNumber();
|
|
48
|
+ public Number selectedFontSize = new NullNumber();
|
42
|
49
|
@Nullable public Typeface fontFamily;
|
43
|
50
|
|
44
|
51
|
|
|
@@ -51,6 +58,8 @@ public class BottomTabOptions {
|
51
|
58
|
if (other.selectedIconColor.hasValue()) selectedIconColor = other.selectedIconColor;
|
52
|
59
|
if (other.badge.hasValue()) badge = other.badge;
|
53
|
60
|
if (other.testId.hasValue()) testId = other.testId;
|
|
61
|
+ if (other.fontSize.hasValue()) fontSize = other.fontSize;
|
|
62
|
+ if (other.selectedFontSize.hasValue()) selectedFontSize = other.selectedFontSize;
|
54
|
63
|
if (other.fontFamily != null) fontFamily = other.fontFamily;
|
55
|
64
|
}
|
56
|
65
|
|
|
@@ -62,6 +71,8 @@ public class BottomTabOptions {
|
62
|
71
|
if (!iconColor.hasValue()) iconColor = defaultOptions.iconColor;
|
63
|
72
|
if (!selectedIconColor.hasValue()) selectedIconColor = defaultOptions.selectedIconColor;
|
64
|
73
|
if (!badge.hasValue()) badge = defaultOptions.badge;
|
|
74
|
+ if (!fontSize.hasValue()) fontSize = defaultOptions.fontSize;
|
|
75
|
+ if (!selectedFontSize.hasValue()) selectedFontSize = defaultOptions.selectedFontSize;
|
65
|
76
|
if (fontFamily == null) fontFamily = defaultOptions.fontFamily;
|
66
|
77
|
}
|
67
|
78
|
}
|