Browse Source

Fix iioobe bottom tab (#3082)

andresesfm 6 years ago
parent
commit
be5056ad12

+ 2
- 1
lib/android/app/src/main/java/com/reactnativenavigation/presentation/BottomTabsOptionsPresenter.java View File

38
             bottomTabs.setBackgroundColor(options.backgroundColor.get());
38
             bottomTabs.setBackgroundColor(options.backgroundColor.get());
39
         }
39
         }
40
         if (options.currentTabIndex.hasValue()) {
40
         if (options.currentTabIndex.hasValue()) {
41
-            bottomTabs.setCurrentItem(options.currentTabIndex.get());
41
+            int tabIndex = options.currentTabIndex.get();
42
+            if (tabIndex >= 0) bottomTabs.setCurrentItem(tabIndex);
42
         }
43
         }
43
         if (options.testId.hasValue()) {
44
         if (options.testId.hasValue()) {
44
             bottomTabs.setTag(options.testId.get());
45
             bottomTabs.setTag(options.testId.get());