Android Intent.bundle 在activity中一对一传递数据
来源:互联网 发布:热处理技术数据手册 编辑:程序博客网 时间:2024/05/22 12:12
前些日子项目紧,一直没时间整理自个的东西,现在终于可以分享一些东西了
intent.bundle传递数据给目标activity的实例:
比如购物车用户输入的某些数据要传递下个切换页面-确认下单的activity,
Intent intent = new Intent(this, PayConfirmActivity.class);Bundle bundle = new Bundle();bundle.putSerializable("payConfirmBean", payConfrimBan);intent.putExtra("payBundle", bundle);intent.putExtra("toId","gwc");startActivity(intent);finish();注意:payConfrimBan 必须要序列化,我这里是让payConfrimBan implement serializable然后目标activity create方法中的代码Intent intent = getIntent();mPayBundle = intent.getBundleExtra("payBundle");if (mPayBundle != null) { mPayConfirmBean = (PayConfrimBan) mPayBundle.getSerializable("payConfirmBean");}这样就在目标activity得到了购物车中的data;
阅读全文
0 0
- Android Intent.bundle 在activity中一对一传递数据
- Activity中Intent传递数据--Bundle
- Android中Intent结合Bundle传递数据
- 使用Intent Bundle在Activity间传递数据
- android Activity之间通过Bundle和Intent传递数据
- Android之Activity之间的数据传递-intent-bundle
- Android中Activity之间的数据传递(Intent和Bundle)
- Android Intent传递Bundle数据
- android中使用Intent在activity之间传递数据
- 利用Intent在Activity中传递数据
- Android Intent Bundle在Activity之间交换数据
- 在Android中通过Intent使用Bundle传递对象
- 在Android中通过Intent使用Bundle传递对象
- 在Android中通过Intent使用Bundle传递对象
- 在Android中通过Intent使用Bundle传递对象
- 在Android中通过Intent使用Bundle传递对象
- 在Android中通过Intent使用Bundle传递对象
- 在Android中通过Intent使用Bundle传递对象
- Android SDK版本号 与 API Level
- ROS中使用ABB Yumi IRB14000的一些资料汇总
- jsp对象
- 查看集群节点api
- delphi 修改代码补全的快捷键(由Ctrl+Space 改为 Ctrl + alt + Space)
- Android Intent.bundle 在activity中一对一传递数据
- 初步认识函数
- mybatis入门教程
- 【转载】----web网站css,js更新后客户浏览器缓存问题,需要刷新才能正常展示的解决办法
- Coderforces Insomnia cure
- VC++实现读取本地已登录的QQ号及应用代码
- apache配置问题:局域网和本机能访问,但是外网无法访问
- 测试人员的核心测试原则
- 我仿佛成了那个差不多先生