提问人:Tony McGhee 提问时间:12/15/2022 最后编辑:giddsTony McGhee 更新时间:12/15/2022 访问量:225
我想在 Kotlin 中保存和恢复 mutableList 或数组
I want to save and restore a mutableList or array in Kotlin
问:
我有以下 mutableList
val rowsSavedList = mutableListOf<Int>()
The data is lost when the app changes from portrait to landscape. I save the rest of my data using onSaveInstanceState and restore with onRestoreInstanceState Is there a way to do this with the mutableList.
我尝试使用onSaveInstanceState和onRestoreInstanceState,但它不起作用。任何帮助将不胜感激。
答: 暂无答案
评论
ViewModel