|
|
|
|
53
|
}
|
53
|
}
|
54
|
|
54
|
|
55
|
public void mergeChildOptions(Options options, Component child) {
|
55
|
public void mergeChildOptions(Options options, Component child) {
|
56
|
- BottomTabOptions withDefaultOptions = options.withDefaultOptions(defaultOptions).bottomTabOptions;
|
|
|
57
|
int index = bottomTabFinder.findByComponent(child);
|
56
|
int index = bottomTabFinder.findByComponent(child);
|
58
|
- if (withDefaultOptions.badge.hasValue()) bottomTabs.setBadge(index, withDefaultOptions.badge.get());
|
|
|
59
|
- if (withDefaultOptions.badgeColor.hasValue()) bottomTabs.setBadgeColor(withDefaultOptions.badgeColor.get());
|
|
|
60
|
- if (withDefaultOptions.fontFamily != null) bottomTabs.setTitleTypeface(index, withDefaultOptions.fontFamily);
|
|
|
61
|
- if (withDefaultOptions.selectedIconColor.hasValue()) bottomTabs.setIconActiveColor(index, withDefaultOptions.selectedIconColor.get());
|
|
|
62
|
- if (withDefaultOptions.iconColor.hasValue()) bottomTabs.setIconInactiveColor(index, withDefaultOptions.iconColor.get());
|
|
|
63
|
- if (withDefaultOptions.selectedTextColor.hasValue()) bottomTabs.setTitleActiveColor(index, withDefaultOptions.selectedTextColor.get());
|
|
|
64
|
- if (withDefaultOptions.textColor.hasValue()) bottomTabs.setTitleInactiveColor(index, withDefaultOptions.textColor.get());
|
|
|
|
|
57
|
+ if (index >= 0) {
|
|
|
58
|
+ BottomTabOptions withDefaultOptions = options.withDefaultOptions(defaultOptions).bottomTabOptions;
|
|
|
59
|
+ if (withDefaultOptions.badge.hasValue()) bottomTabs.setBadge(index, withDefaultOptions.badge.get());
|
|
|
60
|
+ if (withDefaultOptions.badgeColor.hasValue()) bottomTabs.setBadgeColor(withDefaultOptions.badgeColor.get());
|
|
|
61
|
+ if (withDefaultOptions.fontFamily != null) bottomTabs.setTitleTypeface(index, withDefaultOptions.fontFamily);
|
|
|
62
|
+ if (withDefaultOptions.selectedIconColor.hasValue()) bottomTabs.setIconActiveColor(index, withDefaultOptions.selectedIconColor.get());
|
|
|
63
|
+ if (withDefaultOptions.iconColor.hasValue()) bottomTabs.setIconInactiveColor(index, withDefaultOptions.iconColor.get());
|
|
|
64
|
+ if (withDefaultOptions.selectedTextColor.hasValue()) bottomTabs.setTitleActiveColor(index, withDefaultOptions.selectedTextColor.get());
|
|
|
65
|
+ if (withDefaultOptions.textColor.hasValue()) bottomTabs.setTitleInactiveColor(index, withDefaultOptions.textColor.get());
|
|
|
66
|
+ }
|
65
|
}
|
67
|
}
|
66
|
|
68
|
|
67
|
@VisibleForTesting
|
69
|
@VisibleForTesting
|