如何,我会恢复上次查看活动后,该用户已被关闭的应用程序? [英] How would i resume the last viewed activity after the user has been closed the application?

查看:176
本文介绍了如何,我会恢复上次查看活动后,该用户已被关闭的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何将恢复最后一次查看活动后,该用户已被关闭的应用程序。它像,如果用户打开应用程序,第一活动会出现并且当用户点击按钮将继续进行到下一个活动的,如果他关闭该应用程序并打开再次它仍​​然会显示最近访问的活性。如何将我做到这一点?请帮助我。

How would i resume the last viewed activity after the user has been closed the application. It is like, If the user open the application, the first activity will appear and when the user click the button it will proceed to the next activity, if he close the application and open again it will still show the last viewed activity. how would i do that? please help me.

感谢您,

推荐答案

我认为你应该使用共享preferences。而在每次打开活动,你必须把你的共享preference一个值,因此,如果您再次打开你的应用程序会检查您的共享preference值,然后进行比较,称适合的活动珍惜你了。希望它可以帮助:)

I think you should use sharedpreferences. And in every activity you open, you have to put a value on your sharedpreference so that if you open again your application it will check the value of your shared preference then compare it, call the activity that fits the value you got. Hope it helps :)

这篇关于如何,我会恢复上次查看活动后,该用户已被关闭的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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