路过的ArrayList<为MyObject>多个活动之间 [英] Passing ArrayList<MyObject> Between multiple Activities

查看:158
本文介绍了路过的ArrayList<为MyObject>多个活动之间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过多种活动之间的对象一个ArrayList在我的应用程序。是否有可能使用使用setData()方法的意图,做到这一点?

I am trying to pass an ArrayList of Objects between multiple activities in my application. Is it possible to do this using an Intent using the setData() method?

推荐答案

如果您要发送对象的ArrayList那么你的类必须实现的 Parcelable 序列化接口。

If you want to send an ArrayList of objects then your class must implement the Parcelable or Serializable interface .

发送活动之间的自定义对象看到这些好的教程

See these good tutorials for sending custom object between Activities

http://androidideasblog.blogspot.in/2010/02/passing-list-of-objects-between.html

<一个href="http://www.anddev.org/novice-tutorials-f8/simple-tutorial-passing-arraylist-across-activities-t9996.html" rel="nofollow">http://www.anddev.org/novice-tutorials-f8/simple-tutorial-passing-arraylist-across-activities-t9996.html

这篇关于路过的ArrayList&LT;为MyObject&GT;多个活动之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆