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

Reply via email to