Android UI Thread Message Queue dispatch order
It is not possible for onPostExecute() to be called in between Fragment#onDetach() and Fragment#onAttach() during a configuration change. The reasoning behind this claim is threefold: Configuration changes are handled inside a single message in the main thread’s message queue. As soon as the doInBackground() method returns, the AsyncTask schedules the onPostExecute() method to be invoked … Read more