Android examples for android.os:Bundle
Convert Map<String, String> Collection To Bundle
import android.os.Bundle; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; public class Main{ public static Bundle mapToBundle(Map<String, String> map) { Bundle bundle = new Bundle(); for (String key : map.keySet()) { bundle.putString(key, map.get(key)); }/* w w w.j av a 2 s .c om*/ return bundle; } }