我有一个生产者列表视图,当您单击它时,它会打开一个包含许多选项的自定义对话框。当您单击其中一个选项时,将转到另一个活动并且对话框未关闭,因此如果您返回,您可以从该生产者中选择您之前选择的另一个选项。问题是,在带有 android 4.4.4 的 Moto G 2014 中,它给了我一个 WindowLeaked,我已经在带有 Android 4.3 的 S3 和带有 android 4.4.4 的 Moto G 2013 中进行了测试,但没有给我一个 WindowLeaked,它按我的意愿工作,对话框打开,所以我可以做另一个动作。有人可以解释一下为什么吗?
这是 LOGCAT:
10-23 09:44:30.587: E/WindowManager(14134): android.view.WindowLeaked: Activity (DELETED BY ME).AtividadesActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{42604ff8 V.E..... R....... 0,0-640,672} that was originally added here
10-23 09:44:30.587: E/WindowManager(14134): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:359)
10-23 09:44:30.587: E/WindowManager(14134): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248)
10-23 09:44:30.587: E/WindowManager(14134): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
10-23 09:44:30.587: E/WindowManager(14134): at android.app.Dialog.show(Dialog.java:286)
10-23 09:44:30.587: E/WindowManager(14134): at (DELETED BY ME).AtividadesActivity$12.onItemClick(AtividadesActivity.java:648)
10-23 09:44:30.587: E/WindowManager(14134): at android.widget.AdapterView.performItemClick(AdapterView.java:299)
10-23 09:44:30.587: E/WindowManager(14134): at android.widget.AbsListView.performItemClick(AbsListView.java:1113)
10-23 09:44:30.587: E/WindowManager(14134): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2911)
10-23 09:44:30.587: E/WindowManager(14134): at android.widget.AbsListView$3.run(AbsListView.java:3645)
10-23 09:44:30.587: E/WindowManager(14134): at android.os.Handler.handleCallback(Handler.java:733)
10-23 09:44:30.587: E/WindowManager(14134): at android.os.Handler.dispatchMessage(Handler.java:95)
10-23 09:44:30.587: E/WindowManager(14134): at android.os.Looper.loop(Looper.java:136)
10-23 09:44:30.587: E/WindowManager(14134): at android.app.ActivityThread.main(ActivityThread.java:5097)
10-23 09:44:30.587: E/WindowManager(14134): at java.lang.reflect.Method.invokeNative(Native Method)
10-23 09:44:30.587: E/WindowManager(14134): at java.lang.reflect.Method.invoke(Method.java:515)
10-23 09:44:30.587: E/WindowManager(14134): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
10-23 09:44:30.587: E/WindowManager(14134): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
10-23 09:44:30.587: E/WindowManager(14134): at dalvik.system.NativeStart.main(Native Method)