try as:
Bundle extras = new Bundle();
extras.putSerializable("HashMap",hashMap);
intent.putExtras(extras);
and in second Activity
Bundle bundle = this.getIntent().getExtras();
if(bundle != null) {
hashMap = bundle.getSerializable("HashMap");
}
because Hashmap by default implements Serializable
so you can pass it using putSerializable
in Bundle and get in other activity using getSerializable
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…