Tuesday 12 February 2013

Creating AlertDialog in Android ?


// Creating AlertDialog
AlertDialog.Builder alertDialog = new AlertDialog.Builder(
AlertDialogDemoActivity.this);

// set Icon
alertDialog.setIcon(R.drawable.ic_launcher);

// set Title
alertDialog.setTitle("Alert Dialog");

// set Message
alertDialog.setMessage("This is AlertDialog");

// show AlertDialog
alertDialog.show();



No comments:

Post a Comment