的我正在开发一个Android应用程序,在这里我显示在ListView接触的所有名称。序列化对象的ArrayList的Hashmap
联系人列表视图中的onclick,我需要显示在列表视图另一个是联系的相应的数目。
这里的问题是,我捆绑所有的数字和发送它的另一个活动,也获得了捆绑,但收到的包是序列化对象。
所以,在ListView我需要将其转换为的Hashmap的ArrayList中dispaly。 我该怎么做?
下面是代码:
发送活动:
HashMap<String, String> Numbermap = new HashMap<String, String>();
Numbermap.put("numb",number);
Numbermap.put("type",type);
NumberList.add(Numbermap);
Intent intent = new Intent (ContactNames.this,ContactsPhoneNumbers.class);
intent.putExtra("map", NumberList);
startActivity(intent);
接收活动:
Serializable Numbermap = new HashMap<String, String>();
// contNum = (TextView)findViewById(R.id.ContactNumber);
Bundle bundle = getIntent().getExtras();
Intent intent = getIntent();
if(bundle!=null)
{
Numbermap = bundle.getSerializable("map");
}
我的坏。非常感谢您的帮助! – LISA