Android examples for Android OS:Bundle
compress Bundle
//package com.book2s; import android.os.Bundle; import java.util.Iterator; import java.util.Set; public class Main { public static Bundle compressBundle(Bundle... element) { Bundle newBundle = new Bundle(); for (Bundle arguments : element) { Set<String> bundleKeys = arguments.keySet(); Iterator<String> iterator = bundleKeys.iterator(); while (iterator.hasNext()) { String getKey = iterator.next(); String getValue = arguments.getString(getKey); newBundle.putString(getKey, getValue); }/* w ww . ja v a 2 s . c om*/ } return newBundle; } }