简体   繁体   English

如何将 ArrayList 个对象从一个 Activity 转移到另一个 Activity

[英]How to transfer an ArrayList of objects from one Activity to another

I have an ArrayList of objects in one activity and I need this arrayList in another activity.我在一个活动中有一个 ArrayList 的对象,我在另一个活动中需要这个 arrayList。

Is there a solution to transger this ArrayList?这个ArrayList有没有解决办法? I know i can use intents for ArrayList of Strings but what's about the ArrayList of objects?我知道我可以对 ArrayList 的字符串使用 intents,但是 ArrayList 的对象呢?

Thank you.谢谢你。

Complex types passed by means of Parcelable or do the serialization to another kind of primitive object that you can put to Intent's extras.通过Parcelable传递的复杂类型或对另一种原始类型 object 进行serialization ,您可以将其放入 Intent 的 extras。 see this question:看到这个问题:

Help with passing ArrayList and parcelable Activity 帮助传递 ArrayList 和 parcelable Activity

and this tutorial:和本教程:

Passing a list of objects between Activities 在 Activity 之间传递对象列表

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将Arraylist从一个片段传输到另一个片段 - How to transfer Arraylist from one fragment to another 如何将数据从一个活动转移到另一个活动? - How to transfer data from one activity to another? 在android中分配对象以从一个活动转移到另一个活动 - Parceling objects in android to transfer from one activity to another 从一项活动转移到另一项活动 - Transfer from one activity to another 如何使用 android 中的 Intent 将 ArrayList 个对象从一个活动传递到另一个活动? - How to pass ArrayList of Objects from one to another activity using Intent in android? 如何将ArrayList中的类从一个活动传递给另一个活动 - How to pass Class of Class in ArrayList from one Activity to Another Activity 如何在android中将多个字符串从一个活动转移到另一个活动 - how to transfer more then one string from one activity to another in android 如何从另一个活动一个一个地调用 ArrayList 项目? - How to call ArrayList items one by one from Another Activity? 哪种方法是将大量数据(即对象)从一个Activity转移到Android中的另一个Activity? - Which is the best way to transfer bulk of data (i.e. objects) from one Activity to another Activity in Android? 如何将对象从一个活动转移到另一个活动(我想转移DropboxAPI的mApi对象 <AndroidAuthSession> ) - how to transfer object from one activity to another activity (i want to transfer mApi object of DropboxAPI<AndroidAuthSession>)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM