在 android.os.Message
使用捆绑
送与它的sendMessage法。因此,是否有可能把一个的HashMap
在捆绑
?
The android.os.Message
uses a Bundle
to send with it's sendMessage-method. Therefore, is it possible to put a HashMap
inside a Bundle
?
感谢名单提前, 马库斯
Thanx in advance, Marcus
尝试为:
Bundle extras = new Bundle();
extras.putSerializable("HashMap",Hash_Map);
intent.putExtras(extras);
和第二活动
Bundle bundle = this.getIntent().getExtras();
if(bundle!=null){
Hash_Map= bundle.getSerializable("HashMap");
监守的Hashmap 通过默认工具序列化
这样你就可以使用它传递 putSerializable
的包,并使用在其他活动获得 getSerializable
becuase Hashmap by default implements Serializable
so you can pass it using putSerializable
in Bundle and get in other activity using getSerializable
上一篇:PackageInfo版本code和手机上VERSIONNAME空,但它只是对模拟器模拟器、但它、机上、版本
下一篇:调用" Maven项目生成器"在Eclipse中的运行方式 - > Android应用程序(或手动)生成器、应用程序、方式、项目