just use the dismiss() method. Change your dialog declaration in final, implements onClickListener for the dialog (or setOnClickListener, i don't remember) and in the onClick method, call dialog.dismiss();
On 8 avr, 06:39, Pipen <[email protected]> wrote: > Dear all, > > I create my dialog like this, > > Dialog dialog = new Dialog(this, R.style.popup); > > dialog.setContentView(R.layout.popup); > dialog.setTitle(""); > > TextView text = (TextView) > dialog.findViewById(R.id.popupText); > > text.setText(getResources().getString(R.string.contactAdded)); > dialog.setCanceledOnTouchOutside(true); > > The suer can now cancel the notification popup message by clicking > outside the box. But how do I allow the user to cancel the dialog by > touching on the dialog? -- 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 To unsubscribe, reply using "remove me" as the subject.

