从停止的地方开始活动 [英] Start Activity from where it stops

查看:65
本文介绍了从停止的地方开始活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个活动...假设我将其分别命名为活动A和活动B.当应用程序启动时,它显示活动A.然后在5秒钟后,它自动切换到活动B.活动B包含一个列表视图和每个复选框如果用户检查了某项,则按返回按钮,然后返回活动1页面.所有这些都可以正常工作.
现在我的问题是,活动A有一个可以再次进入活动B页面的按钮.当用户按下此按钮时,我要从停止的位置开始活动B.这意味着用户将看到他之前检查过的项目.从活动B的停止位置查看活动B页面?

I have 2 activity...suppose i name it activity A and activity B.When the application starts it shows activity A.Then after 5 seconds,it automatically switch to activity B.Activity B contains a listview and checkboxes with each item of listview.If user checks something then he press back button and returns to activity 1 page.All these works correctly.
Now my problem is,activity A has a button to go again activity B page.When user press this button i want to start activity B from where it stops..that means the user will see what items he had checked earlier.Is it possible to view the activity B page from where it stops?

推荐答案

我找到了这个问题的解决方案.当应用程序从活动B转到活动A时,我保存了检查清单视图,当应用程序再次进入活动B时,我检查了包含该ID的清单视图项目的复选框.
I find my solution of this question.When application goes from activity B to activity A i save some id of that checked listview and when the application again comes to activity B then i checked the checboxes of that listview items which contains that id.


这篇关于从停止的地方开始活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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