Well it should, but I suspect you are doing something wrong by creating a
new AlertDialog every time.
I haven't really used that method to construct dialogs, but rather keeping
track of them myself.
(by holding on to the reference and releasing it when necessary.)

It seems that those methods are deprecated any way, you may want to look
into a different solution that will work now and in the future.

On Tue, Mar 22, 2011 at 2:09 PM, John <jo-d...@hotmail.com> wrote:

> On Mar 22, 3:05 pm, Miguel Morales <therevolti...@gmail.com> wrote:
> > Are you holding on to the dialog reference?  That's probably it.
>
> I don't think so. I am using onCreateDialog. The code is below. My
> understanding is that Anroid itself is supposed to handle the memory
> management for me.
>
>    protected Dialog onCreateDialog(int id) {
>        Dialog dialog = null;
>        switch(id) {
>                case DIALOG_DOWNLOAD:
>                case DIALOG_INSTALL:
>                                dialog = new
> AlertDialog.Builder(currentActivity)
>                                .setMessage("You are about to download this
> file. Do you want to
> continue?")
>                                .setPositiveButton("Cancel", null)
>                                .setNegativeButton("OK", new
> AlertOnClickHandler(id) )
>                                .setTitle("Confirm Download")
>                                .create();
>                        break;
>                default:
>                        dialog = super.onCreateDialog(id);
>                }
>        return dialog;
>    }
>
> --
> 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+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/ http://www.youtube.com/user/revoltingx

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to