Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议去除onSaveInstanceXXX() onStop() onPause()调用顺序的对比 #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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