问题描述
我的Android应用程序只有一个名为一个活动 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"
这篇关于是否有可能节省previous活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!