Android: go back to previous activity? [duplicate]
Is there a way I can force the us开发者_Go百科er to go back to the previous Activity? I'd like to kill my current Activity make the user "go back" possible?
Call finish in your Activity : http://d.android.com/reference/android/app/Activity.html#finish()
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
Call finish()
From the link: Call this when your activity is done and should be closed. The ActivityResult is propagated back to whoever launched you via onActivityResult().
Call finish()
to end the current activity and go back.
精彩评论