|
@@ -7,6 +7,7 @@ import com.aurelhubert.ahbottomnavigation.notification.AHNotification;
|
7
|
7
|
import com.reactnativenavigation.parse.BottomTabOptions;
|
8
|
8
|
import com.reactnativenavigation.parse.DotIndicatorOptions;
|
9
|
9
|
import com.reactnativenavigation.parse.Options;
|
|
10
|
+import com.reactnativenavigation.parse.params.Param;
|
10
|
11
|
import com.reactnativenavigation.utils.ImageLoader;
|
11
|
12
|
import com.reactnativenavigation.utils.ImageLoadingListenerAdapter;
|
12
|
13
|
import com.reactnativenavigation.utils.LateInit;
|
|
@@ -78,8 +79,8 @@ public class BottomTabPresenter {
|
78
|
79
|
if (index >= 0) {
|
79
|
80
|
BottomTabOptions tab = options.bottomTabOptions;
|
80
|
81
|
if (tab.fontFamily != null) bottomTabs.setTitleTypeface(index, tab.fontFamily);
|
81
|
|
- if (tab.selectedIconColor.hasValue()) bottomTabs.setIconActiveColor(index, tab.selectedIconColor.get());
|
82
|
|
- if (tab.iconColor.hasValue()) bottomTabs.setIconInactiveColor(index, tab.iconColor.get());
|
|
82
|
+ if (canMerge(tab.selectedIconColor)) bottomTabs.setIconActiveColor(index, tab.selectedIconColor.get());
|
|
83
|
+ if (canMerge(tab.iconColor)) bottomTabs.setIconInactiveColor(index, tab.iconColor.get());
|
83
|
84
|
if (tab.selectedTextColor.hasValue()) bottomTabs.setTitleActiveColor(index, tab.selectedTextColor.get());
|
84
|
85
|
if (tab.textColor.hasValue()) bottomTabs.setTitleInactiveColor(index, tab.textColor.get());
|
85
|
86
|
if (tab.text.hasValue()) bottomTabs.setText(index, tab.text.get());
|
|
@@ -143,4 +144,8 @@ public class BottomTabPresenter {
|
143
|
144
|
private boolean shouldApplyDot(BottomTabOptions tab) {
|
144
|
145
|
return tab.dotIndicator.visible.hasValue() && !tab.badge.hasValue();
|
145
|
146
|
}
|
|
147
|
+
|
|
148
|
+ private boolean canMerge(Param p) {
|
|
149
|
+ return p.hasValue() && p.canApplyValue();
|
|
150
|
+ }
|
146
|
151
|
}
|