有A,B两个Activity,A上面有一个button,b里面是空的。
操作是点击A上面的button,跳转到B,然后按返回(手机上的按钮,不是自己建的),回到A
从程序运行开始,
A----oncreate
A----onstart
A----onresume
A----onpause
B----oncreate
B----onstart
B----onresume
A----onstop
B--onpause
A--onrestart
A--onstart
A--onresume
B--onstop
B--ondestroy <- 问题所在,为什么B返回A时就要destory呢,A到B的时候就不会,而且每次从A中button点到B时都要create,不能restart吗)
还有stop到底是什么意思,调用另一个activity时暂停当前的,保存数据,当前的页面不可见,另一个开始,
其中stop是什么作用。
操作是点击A上面的button,跳转到B,然后按返回(手机上的按钮,不是自己建的),回到A
从程序运行开始,
A----oncreate
A----onstart
A----onresume
A----onpause
B----oncreate
B----onstart
B----onresume
A----onstop
B--onpause
A--onrestart
A--onstart
A--onresume
B--onstop
B--ondestroy <- 问题所在,为什么B返回A时就要destory呢,A到B的时候就不会,而且每次从A中button点到B时都要create,不能restart吗)
还有stop到底是什么意思,调用另一个activity时暂停当前的,保存数据,当前的页面不可见,另一个开始,
其中stop是什么作用。
谢谢
http://bbs.csdn.net/topics/390885896