销毁android Activity方法如下:
public void onDestroy() {
try{
//这里是你需销毁的事件
}
catch(Exception ex){}
super.onDestroy();
}
用finish()方法会调用onDestroy(),即可销毁一个Activity
How to destroy an Activity in android
android之view获取getWidth()和getHeight()
本文介绍如何在Android中销毁Activity,通过重写onDestroy方法并调用super.onDestroy()来完成销毁过程。使用finish()方法会触发onDestroy(),实现Activity的销毁。
1万+

被折叠的 条评论
为什么被折叠?



