开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜