设为首页 加入收藏

TOP

Android—Bundle传递ArrayList<T>(二)
2017-10-13 09:42:57 】 浏览:1028
Tags:Android Bundle 传递 ArrayList< T>
ted method stub return new Gate[size]; } };

详细请阅读注释,如果没有以上两端代码,传值一样会失败。

传值:

Intent intent = new Intent(LoginActivity.this,
						PeizhiActivity.class);
				Bundle bundle = new Bundle();
				bundle.putParcelableArrayList("gates", gates);
				intent.putExtras(bundle);
				startActivity(intent);

 接收:

Bundle bundle = getIntent().getExtras();
		gates = bundle.getParcelableArrayList("gates");

 希望可以给大家带来帮助,谢谢。

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇个人冲刺03 下一篇安卓学习笔记一

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目