Intent传List、Map
(1)新建类实现Serializable接口
public class SerializableMap implements Serializable{
private Map<String,Object> map;
public Map<String,Object> getMap(){
return map;
}
public void setMap(Map<String,Object> map){
this.map=map;
}
}
(2)通过Intent传值
Intent intent=new Intent(context,XXX.class);
Bundle bundle=new Bundle();
SerializableMap mapSer=new SerializableMap ();
mapSer.setMap(map);
bundle.putSerializable("map",mapSer);
intent.putExtras(bundle);
context.startActivity(intent);