Android development by default, the bundle bundle=new bundle (); The pass-through value cannot be passed directly to the map object, but the workaround:
The first step: encapsulate your own map to enable serialization
/** * serialization map for bundle delivery map using * Created on 13-12-9. */ public class serializablemap Serializable { private map<string,object> map; public map<string, Object> Getmap () { return map; public void Setmap (map< String, Object> map) { this . Map = map; }}
Step Two: Pass the data:
Intent intent=NewIntent (listviewactivity. This, Updatewatchactivity.class); //Passing Data FinalSerializablemap mymap=NewSerializablemap (); Mymap.setmap (map);//Add map data to the encapsulated mymap<span></span>Bundle bundle=NewBundle (); Bundle.putserializable ("Map", MYMAP); Intent.putextras (bundle);
Step three: Receive data:
Bundle bundle == (serializablemap) bundle.get ("map");
Android Pass Data bundle encapsulation Pass Map object