Hi,

I would like to launch new activity from the PositiveButton of alert dialog but
it throws error.


here is code i m using...


 final AlertDialog alertDialog = new
AlertDialog.Builder(placeorder.this).create();
        alertDialog.setMessage("Are you sure you want place order?");
        alertDialog.setCancelable(false);
        alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, "Yes",new
DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dialog, int id) {
                   Intent newintent1 = new
Intent(placeorder.this,finalpage.class);
                   alertDialog.cancel();
                   startActivity(newintent1);

                   }
               });

        alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, "No",new
DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {
                 dialog.cancel();
                }
            });


Please advice.

-Regards,
Manas Shah.

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