2

我有一项活动,预计在启动时会传递一些额外内容。

getIntent()当这个活动被销毁并重新创建时,从内部调用返回的意图是否onCreate()包含与活动最初启动时相同的额外内容?

4

1 回答 1

5

Depends on if it was intentionally destroyed. If it was destroyed by a finish() call, no. If it was destroyed because the system was freeing up memory, yes. It will also have a flag stating that this is a recreate (useful if your app only works from the first activity, such as an app that needs you to be logged in).

于 2013-04-16T17:20:32.783 回答