use of com.reactnativenavigation.options.DotIndicatorOptions in project react-native-navigation by wix.
the class BottomTabPresenter method mergeDotIndicator.
private void mergeDotIndicator(int index, DotIndicatorOptions dotIndicator) {
if (bottomTabs == null)
return;
AHNotification.Builder builder = new AHNotification.Builder();
if (dotIndicator.color.hasValue())
builder.setBackgroundColor(dotIndicator.color.get());
builder.setSize(dotIndicator.visible.isFalse() ? 0 : dotIndicator.size.get(defaultDotIndicatorSize));
if (dotIndicator.animate.hasValue())
builder.animate(dotIndicator.animate.get());
AHNotification notification = builder.build();
if (notification.hasValue())
bottomTabs.perform(bottomTabs -> bottomTabs.setNotification(notification, index));
}
Aggregations