是否有可能节省previous活动? [英] Is it possible to save previous activity?

查看:157
本文介绍了是否有可能节省previous活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的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"

这篇关于是否有可能节省previous活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆