소스 검색

Fix iioobe bottom tab (#3082)

andresesfm 6 년 전
부모
커밋
be5056ad12
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      lib/android/app/src/main/java/com/reactnativenavigation/presentation/BottomTabsOptionsPresenter.java

+ 2
- 1
lib/android/app/src/main/java/com/reactnativenavigation/presentation/BottomTabsOptionsPresenter.java 파일 보기

@@ -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());