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,7 +38,8 @@ public class BottomTabsOptionsPresenter {
38 38
             bottomTabs.setBackgroundColor(options.backgroundColor.get());
39 39
         }
40 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 44
         if (options.testId.hasValue()) {
44 45
             bottomTabs.setTag(options.testId.get());