Bläddra i källkod

Add BottomTabs in correct order on pre KitKat devices

Guy Carmeli 8 år sedan
förälder
incheckning
771eca27ec

+ 4
- 3
android/app/src/main/java/com/reactnativenavigation/params/parsers/ScreenParamsParser.java Visa fil

@@ -11,6 +11,7 @@ import com.reactnativenavigation.params.TopTabParams;
11 11
 import com.reactnativenavigation.react.ImageLoader;
12 12
 
13 13
 import java.util.ArrayList;
14
+import java.util.Arrays;
14 15
 import java.util.List;
15 16
 
16 17
 public class ScreenParamsParser extends Parser {
@@ -101,10 +102,10 @@ public class ScreenParamsParser extends Parser {
101 102
     }
102 103
 
103 104
     public static List<ScreenParams> parseTabs(Bundle params) {
104
-        List<ScreenParams> result = new ArrayList<>();
105
+        ScreenParams result[] = new ScreenParams[params.keySet().size()];
105 106
         for (String key : params.keySet()) {
106
-            result.add(ScreenParamsParser.parse(params.getBundle(key)));
107
+            result[Integer.parseInt(key)] = ScreenParamsParser.parse(params.getBundle(key));
107 108
         }
108
-        return result;
109
+        return new ArrayList<>(Arrays.asList(result));
109 110
     }
110 111
 }