安卓:回去previous活动? [英] Android: go back to previous activity?
问题描述
有没有一种方法,我可以强制用户回到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屋!