|
@@ -76,12 +76,12 @@ public class BottomTabsController extends ParentController implements AHBottomNa
|
76
|
76
|
this.tabs = tabs;
|
77
|
77
|
getView();
|
78
|
78
|
for (int i = 0; i < tabs.size(); i++) {
|
79
|
|
- createTab(tabs.get(i), tabs.get(i).options.bottomTabOptions, tabs.get(i).options.bottomTabsOptions);
|
|
79
|
+ createTab(i, tabs.get(i), tabs.get(i).options.bottomTabOptions, tabs.get(i).options.bottomTabsOptions);
|
80
|
80
|
}
|
81
|
81
|
selectTabAtIndex(0);
|
82
|
82
|
}
|
83
|
83
|
|
84
|
|
- private void createTab(ViewController tab, final BottomTabOptions tabOptions, final BottomTabsOptions bottomTabsOptions) {
|
|
84
|
+ private void createTab(int index, ViewController tab, final BottomTabOptions tabOptions, final BottomTabsOptions bottomTabsOptions) {
|
85
|
85
|
if (!tabOptions.icon.hasValue()) {
|
86
|
86
|
throw new RuntimeException("BottomTab must have an icon");
|
87
|
87
|
}
|
|
@@ -91,6 +91,7 @@ public class BottomTabsController extends ParentController implements AHBottomNa
|
91
|
91
|
setIconColor(drawable, bottomTabsOptions);
|
92
|
92
|
AHBottomNavigationItem item = new AHBottomNavigationItem(tabOptions.title.get(""), drawable);
|
93
|
93
|
bottomTabs.addItem(item);
|
|
94
|
+ bottomTabs.post(() -> bottomTabs.setTabTag(index, tabOptions.testId));
|
94
|
95
|
}
|
95
|
96
|
|
96
|
97
|
@Override
|