在android中恢复listView
我正在从 Activity_A 导航到 Activity_B 并在 Activity_B 中显示列表视图,当我按 Activity_B 中的后退按钮时,控件会转到 Activity_A。现在,我再次导航到 Activity_B,现在我不想再次创建列表视图,而是想显示之前创建的列表视图。如何做到这一点?任何人请帮助我...
提前致谢...
I am navigating from Activity_A to Activity_B and showing a list view in Activity_B , when I press back button in Activity_B control comes to Activity_A. Now, again I navigate to Activity_B, now I dont want to create the list View once again instead I want to show the list View previously created. How to do this ? Any one please help me...
Thanks in advance....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您启动 Activity_B 时设置 Flag
如果启动的活动已经在运行,此标志将导致该活动被带到其任务历史堆栈的前面。
when you start Activity_B set the Flag
this flag will cause the launched activity to be brought to the front of its task's history stack if it is already running.
您需要保存活动的状态。
http://developer.android.com/guide/topics /fundamentals/tasks-and-back-stack.html
You need to save your Activity's state.
http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html