When are ALL the cases when the onSaveInstanceStat

2020-02-10 17:16发布

All the sources I read have all mentioned couple of cases and concluded with "a few other cases". What are ALL the cases when the onSaveInstanceState method called in a View/Activity?

标签: java android
7条回答
Melony?
2楼-- · 2020-02-10 18:00

Whenever there is as soft kill of the activity. I.e when the orientation changes or when the process is killed by android due to low memory.

It's not called when the user knowingly just navigates away from the activity.

Refer to this link: https://sites.google.com/site/jalcomputing/home/mac-osx-android-programming-tutorial/saving-instance-state

查看更多
登录 后发表回答