Intent extras 에 Hashtable 넘길 때

인텐트로 해시테이블 데이타를 passing 할 때 방법입니다.

인텐트에 해시테이블을 넘길 때
// A.class
Hashtable m_hash = new Hashtable();
m_hash.put("1", "aimh" );
m_hash.put("2", "tcher" );
m_hash.put("3", "picomax" );

Intent intent = new Intent(this, B.class);
intent.putExtra("data", m_hash);


해시테이블 데이타를 받을 때
// B.class
Serializable m_data = getIntent().getSerializableExtra("data");
Hashtable m_hash = new Hashtable((HashMap)m_data);
//m_hash.get("1");
//m_hash.get("2");
//m_hash.get("3");

Posted by Tcher

2010/02/22 13:42 2010/02/22 13:42
, , ,
Response
No Trackback , No Comment
RSS :
http://blog.inculab.net/rss/response/32

Trackback URL : http://blog.inculab.net/trackback/32

Leave a comment
[로그인][오픈아이디란?]
« Previous : 1 : ... 15 : 16 : 17 : 18 : 19 : 20 : 21 : 22 : 23 : ... 46 : Next »

블로그 이미지

- Tcher

Notices

Site Stats

Total hits:
24762
Today:
7
Yesterday:
131