Android examples for Android OS:Bundle Key
fill Bundle Ints From Key
//package com.book2s; import android.os.Bundle; public class Main { public static int[] fillIntsFromKey(Bundle bundle, String baseKey) { int count = countIndexes(bundle, baseKey); int[] array = new int[count]; for (int i = 0; i < array.length; i++) array[i] = bundle.getInt(baseKey + i); return array; }//from www.j a va 2s.c om public static int countIndexes(Bundle bundle, String baseKey) { int count = 0; while (bundle.containsKey(baseKey + count)) count++; return count; } }