Is there any easy way to add a cancel button to this?

      AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle("t");
        builder.setMessage("m");
        builder.setCancelable(true);
        builder.setPositiveButton("Facebook", new OnClickListener() {

                        @Override
                        public void onClick(DialogInterface arg0, int arg1) {
                                // TODO Auto-generated method stub

                        }
                });

        builder.setNegativeButton("Twitter", new OnClickListener() {

                        @Override
                        public void onClick(DialogInterface arg0, int arg1) {
                                // TODO Auto-generated method stub

                        }
                });

        builder.show();

-- 
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