We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
有a、b两个Activity,当从a进入b之后一段时间,可能系统会把a回收,这时候按back,执行的不是a的onRestart而是onCreate方法,a被重新创建一次,这是a中的临时数据和状态可能就丢失了。绝对不走Oncreate方法、lz还是考虑考虑边实践边写文章吧
The text was updated successfully, but these errors were encountered:
你是说绝对不走 onSaveInstanceState 方法吧,在a进入b之前就已经执行了 onSaveInstanceState 方法了,你自己实践一下再说。
com.audienl.test I/AudienL: LifeCycle : MainActivity -> onPause com.audienl.test I/AudienL: LifeCycle : SecondActivity -> onCreate : savedInstanceState = null com.audienl.test I/AudienL: LifeCycle : SecondActivity -> onStart com.audienl.test I/AudienL: LifeCycle : SecondActivity -> onResume com.audienl.test I/AudienL: LifeCycle : MainActivity -> onSaveInstanceState com.audienl.test I/AudienL: LifeCycle : MainActivity -> onStop
Sorry, something went wrong.
No branches or pull requests
有a、b两个Activity,当从a进入b之后一段时间,可能系统会把a回收,这时候按back,执行的不是a的onRestart而是onCreate方法,a被重新创建一次,这是a中的临时数据和状态可能就丢失了。绝对不走Oncreate方法、lz还是考虑考虑边实践边写文章吧
The text was updated successfully, but these errors were encountered: