android - 如何在android的两个不同活动中显示嵌套的json对象和数组
问题描述
我有一个包含嵌套对象和数组的 Web 服务,我已经在一个活动中解析了数据,但是我想在两个不同的活动中显示数据,我该如何实现呢?
解决方案
This SO post (Storing/retrieving strings with shared preferences) explains how to add and retrieve strings from sharedPrefs. After downloading the JSON in your web service, store the response in ActivityA, and when opening ActivityB, retrieve and parse the JSON using a method common to both activities.
推荐阅读
- matlab - 非连续双积分 [MATLAB]
- sql - 基于 datetime2 谓词连接表
- python - 如何为 pytorch 可分离 conv 模型创建输入?
- flutter - 如何在 Flutter 中突出显示搜索到的单词
- python - 提高python函数的性能
- c - 用 c 中的 ftell() 和 fseek() 知道文件中“人”的位置
- xamarin.forms - 从 Xamarin 表单中的事件执行 ReactiveUI 命令
- php - 插入图片 PHP Mysql
- android - Android 模拟器无法连接到 Firebase 模拟器
- javascript - 为什么 notifyItemChanged(position) 不更新 RecyclerView 中的所有项目?