android - Intent.putExtra 会做什么

标签 android android-intent android-activity

我是 android 的新手,我使用 intents 将数据从一个 Activity 传输到另一个。我只是想知道对象引用或对象副本是否正在发送到第二个 Activity。

最佳答案

Intent.putExtra 发送对象的副本,当您从在那里创建新引用的 Intent 中获取额外内容时,它不是相同的引用

关于android - Intent.putExtra 会做什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15826553/

相关文章:

android - FLAG_ACTIVITY_NEW_TASK 在 API 31 中不起作用?

android - 如何实现 getSupportParentActivityIntent() 以在 android 中为向上按钮动态设置 Activity

android - 如何在 Android 中管理多个 Activity 交互?

android 如何在 root 设备的\system\fonts 目录中安装自定义字体

android - 如何在 Android 中以编程方式将手机置于飞行模式?

Android 4.1.2 默认浏览器 - 禁用输入字段的渲染问题

android - 获取上下文的问题

Android 应用程序崩溃(looper = null)

android - 如何在另一个 Activity 上显示透明 Activity 而不删除以前的 Activity

android - Google Play 音乐是否占用了所有 ACTION_MEDIA_BUTTON Intent ?