Android examples for android.os:Bundle
Convert Map<String, Serializable> To Bundle
import android.os.Bundle; import java.io.Serializable; import java.util.HashMap; import java.util.Map; public class Main{ public static Bundle mapToBundle(Map<String, Serializable> map) { Bundle result = new Bundle(); if (map == null) return result; for (String key : map.keySet()) { result.putSerializable(key, map.get(key)); }/*from w w w .jav a 2 s . c om*/ return result; } }