您的位置:首页 > 移动开发 > Android开发

android使用finish()和System.exit()退出应用程序的理解

2010-12-09 09:28 363 查看
I'm new in Android!!
this.finish() in Activity only stop and destroy this activity, application still staying background (check by hold HOME button)
I used:
System.exit(0);
but it still appear there!

That's how Android works. The user/developer is not given any way to actually exit the application. When you call 'finish', the application stack is just pushed to the background. It still exists in the memory. Android itself decides when to close the application(i.e. remove its instance from the memory) and generally this is done when your application becomes the oldest application which was not used for the longest time.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: