Sunday, January 27, 2013

Re: [android-developers] AlertDialog and AsyncTask


On Sat, Jan 26, 2013 at 8:37 PM, dashman <erjdriver@gmail.com> wrote:
but if the Dialog instance has been dismissed - won't that instance be gone

and therefore dialog.isShowing() would result in an error.

No. dismiss() does not somehow magically null out the reference on which it's called. It hides the dialog from showing, resulting in isShowing() returning false.

You can just try this out and see for yourself.
 
the problem i'm trying to make sure doesn't happen is the Asynctask
fnishing after the dialog closes and I try to write to a dialog control
that no longer exists.

See Piren's response.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
 
 

No comments:

Post a Comment