The create method of the builder creates and returns a new dialog each
time you call it. So when you do that you are creating a second dialog
that hasn't been shown, then calling dismiss on it. If you used
Activity#showDialog to show your dialog, then just use
Activity#dismissDialog with the same ID parameter to dismiss it. Using
these methods is called using managed dialogs, because the activity
manages them for you. If you are not using managed dialogs, then keep
a reference to the dialog when you first create it on your own. Save
the result of the create method the first time you call it to a field
and then call dismiss on that later.

On May 27, 9:53 am, Lamia Hannoun <[email protected]> wrote:
> Hi!
>
> well it's all in the subject :) do u have any ideas about how to dismiss a
> builder from an external button. I did mybuilder.create().dismiss() inside
> the onclicklistener of the button. But it doesn't work.
>
> Thx for any help.

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

Reply via email to