Reputation: 162955
In my android application, I start another activity using 'startActivity'. Is there anyway for me to kill that activity I started?
Thank you.
Upvotes: 1
Views: 7539
Reputation: 87420
You can stop the other activity by calling Activity.finish()
. Alternatively, you can use Activity.finishActivity()
to finish an activity started by startActivityForResult()
.
Upvotes: 5
Reputation: 3005
When you start the new activity, the old activity goes onPause(). you could try calling finish() in the onPause() of the old activity.
Upvotes: 1