AlertDialog.Builder builder2=new AlertDialog.Builder(MyAlertdialogActivity.this);
builder2.setMessage("Do you want to continue");
builder2.setPositiveButton("Yes",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stubToast.makeText(getApplicationContext(), "U Clicked OK", Toast.LENGTH_LONG).show();
}
});
builder2.setNegativeButton("No", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stubToast.makeText(getApplicationContext(), "U Clicked Cancel ", Toast.LENGTH_LONG).show();
}
});
builder2.show();
Wednesday, 26 September 2012
android: Alert Dialog with two buttons
Labels:
Android
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment