I have a problem, an Activity my has a list of multi-selectable objects, with the long click I can select several of these objects and click the remove button, when I click to remove, a progress dialog appears that is executed by an AssyncTask .
The problem is that when I change the orientation of the smartphone (either it changes to portrait or landscape) the view is updated, and this causes the thread to stop causing an error, how do I prevent this error? Or prevent assynctask from stopping without having to set an orientation?
Error:
java.lang.IllegalArgumentException
WindowManagerGlobal.java line 372 in WindowManagerGlobal.findViewLocked()
android.view
WindowManagerGlobal.java line 372 in WindowManagerGlobal.findViewLocked()
android.view
WindowManagerGlobal.java line 301 in WindowManagerGlobal.removeView()
android.view
WindowManagerImpl.java line 84 in WindowManagerImpl.removeViewImmediate()
android.app
Dialog.java line 332 in Dialog.dismissDialog()
android.app
Dialog.java line 123 in Dialog$1.run()
android.os
Handler.java line 808 in Handler.handleCallback()
android.os
Handler.java line 103 in Handler.dispatchMessage()
android.os
Looper.java line 193 in Looper.loop()
android.app
ActivityThread.java line 5292 in ActivityThread.main()