开发者

Android - Activity Remains Open Debug

Is it possible for an Android activity to remain in memory, even after it's "finished" (e.g. a user presses the back button). And if it is, how can I debug whether thi开发者_如何学运维s is the case?


I don't think this is possible. Check the lifecycle, to be absolutely sure you can Override the onDestroy() method and debug there.

When you are passed this method you can be sure it is destroyed.

Android - Activity Remains Open Debug


Yes, it's possible. But no, you shouldn't worry about it. Android may keep things around if it doesn't need to reclaim the memory, on the chance that the user might like to go back into them.


just save ur bundle , then setExtra(saved Bundle) to intent . because your activity creates from dis bundle only .... use preference/class variable to save it as pr ur need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜