是否有可能节省previous活动?有可能、节省、previous

2023-09-12 06:03:24 作者:执刀手

我的Andr​​oid应用程序只有一个名为一个活动 MainActivity 。当我preSS的后退按钮并再次运行我的应用程序中,previous活性会被破坏。现在我想知道,是有可能节省的具体previous活动?

My Android Application has only one activity called MainActivity. When I press the back-button and run my application again, the previous activity will be destroyed. Now I want to know that is it possible to save the exact previous activity?

感谢您

推荐答案

pressing返回键杀死你当前活动。用户不希望它被保存为有没有办法去前进。

Pressing the back key kills your current activity. A user would not expect it to be saved as there is no way to go "Forward" .

您可以保存您的活动的共享preferences的重要组成部分或一个数据库时,你preSS回来了,它恢复到previous状态,当活动下次启动它将使IM pression,它是保存

You can save the important parts of your activity in SharedPreferences or a database when you press back and restore it to its previous state when the activity next starts which would give the impression that it was "saved"