传递活动之间的自定义对象? [英] Passing custom objects between activities?

查看:103
本文介绍了传递活动之间的自定义对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何传递的Andr​​oid activites之间的自定义对象?我知道捆绑,但我似乎无法看到他们为这个任何功能。谁能告诉我这方面的一个很好的例子?

How do I pass custom objects between activites in android? I'm aware of bundles but I can't seem to see any functionality for this in them. Could anyone show me a nice example of this?

推荐答案

您应该实现Parcelable接口。的http://bimbim.in/post/2010/09/27/Android-Passing-object-from-one-activity-to-another.aspx

You should implement Parcelable interface. http://bimbim.in/post/2010/09/27/Android-Passing-object-from-one-activity-to-another.aspx

修改的链接文档:的http:// developer.android.com/reference/android/os/Parcelable.html

这篇关于传递活动之间的自定义对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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