我用下面的代码来启动activity
:不知何故Android的活动恢复
Intent intent = new Intent(XXX.this, YYY.class);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(data);
,我不知道为什么,XXX的onResume()
方法被调用。 因为我试图弹出一个progressDialog
内onResume()
,我得到了以下错误:
`android.view.WindowLeaked: Activity XXX has leaked window [email protected] that was originally added here.`
在调试模式下,我设置了breakpoint
在方法onResume()
的第一线,它永远不会停在那里,但我仍然得到上面的错误。
为什么会发生这种情况?
你不应该调用startActivity(intent),而不是startActivity(data)? – Xono
看到这个问题:http://stackoverflow.com/q/2850573/844882 –