A Way to kill an activity in Android
In my android application, I start another activity using 'startActivity'. Is there anyway for me to kill that activity I sta开发者_StackOverflowrted?
Thank you.
You can stop the other activity by calling Activity.finish()
. Alternatively, you can use Activity.finishActivity()
to finish an activity started by startActivityForResult()
.
When you start the new activity, the old activity goes onPause(). you could try calling finish() in the onPause() of the old activity.
精彩评论