【发布时间】:2021-02-11 15:17:08
【问题描述】:
我有一个班级data,我在其中存储我的用户数据。
public class deck {
public static ArrayList deck = new ArrayList();
public static ArrayList cardchosen = new ArrayList();
public static ArrayList deck1Image = new ArrayList();
public static ArrayList deck2Image = new ArrayList();
}
如何在 onSaveInstanceState 中保存这些数组的状态? 我必须使用不同的东西吗?
【问题讨论】:
-
deck、cardchosen、deck1Image、deck2Image的ArrayList()的类型是什么?
-
全是 Integer ArrayList
-
我已经尝试过使用 outstate.getIntegerArraylist 但它得到红色下划线...
标签: java android arraylist save onsaveinstancestate