路过的ArrayList<为MyObject>多个活动之间

路过的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

http://www.anddev.org/novice-tutorials-f8/simple-tutorial-passing-arraylist-across-activities-t9996.html