When are ALL the cases when the onSaveInstanceState() method called?

后端 未结 7 801
粉色の甜心
粉色の甜心 2020-12-17 17:15

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 Vi

相关标签:
7条回答
  • 2020-12-17 17:56

    onSaveInstanceState() will be called by default for a view if it has an id.

    google said: "The default implementation takes care of most of the UI per-instance state for you by calling onSaveInstanceState() on each view in the hierarchy that has an id".

    More info here.

    0 讨论(0)
提交回复
热议问题