现在的位置: 首页 > 综合 > 正文

Android中Activity之间传递自定义对象

2013年10月01日 ⁄ 综合 ⁄ 共 302字 ⁄ 字号 评论关闭

源Activity

          Intent intent = new Intent(queryList.this, itemActivity.class);          
          Bundle mBundle = new Bundle();
	  mBundle.putSerializable(KEY_STU, studentInfo);
	  intent.putExtras(mBundle);
          startActivity(intent);

目标Activity

          StudentInfo studentInfo = (StudentInfo)getIntent().getSerializableExtra(KEY_STU);
【上篇】
【下篇】

抱歉!评论已关闭.