Skip to content

Conversation

@feynman-x
Copy link

开发者只要知道onSaveInstanceState()调用的不确定性就足够了。而且这个方法在AppCompatActivity和Activity中的解释是有冲突的。

  • AppCompatActivity的文档有如下解释
    If called, this method will occur after onStop for applications targeting platforms starting with Build.VERSION_CODES.P. For applications targeting earlier platform versions this method will occur before onStop and there are no guarantees about whether it will occur before or after onPause.
  • Activity 的文档有如下解释
    If called, this method will occur before onStop(). There are no guarantees about whether it will occur before or after onPause().

开发者只要知道onSaveInstanceState()调用的不确定性就足够了。而且这个方法在AppCompatActivity和Activity中的解释是有冲突的。
- AppCompatActivity的文档有如下解释
If called, this method will occur after onStop for applications targeting platforms starting with Build.VERSION_CODES.P. For applications targeting earlier platform versions this method will occur before onStop and there are no guarantees about whether it will occur before or after onPause.
- Activity 的文档有如下解释
If called, this method will occur before onStop(). There are no guarantees about whether it will occur before or after onPause().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant