安卓:回去previous活动? [英] Android: go back to previous activity?

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

问题描述

有没有一种方法,我可以强制用户回到previous活动?我想杀死我目前的活动让用户回去可能吗?

Is there a way I can force the user to go back to the previous Activity? I'd like to kill my current Activity make the user "go back" possible?

推荐答案

呼叫在活动结束:<一href=\"http://d.android.com/reference/android/app/Activity.html#finish\">http://d.android.com/reference/android/app/Activity.html#finish()

和确保你正确启动你的活动已在活动堆栈的状态,检查那里的文档:<一href=\"http://d.android.com/guide/topics/fundamentals/tasks-and-back-stack.html\">http://d.android.com/guide/topics/fundamentals/tasks-and-back-stack.html

And to make sure you started your activity correctly to have the state in the Activity Stack, check the documentation there : http://d.android.com/guide/topics/fundamentals/tasks-and-back-stack.html

这篇关于安卓:回去previous活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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