Basic AlertDialog Using Tutorial

1. The following is the sample code to use alert dialog in an android application:

    public void warningmessage(AlertDialog.Builder alertDialogBuilder, String str,int titleId)
    	alertDialogBuilder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
			public void onClick(DialogInterface dialog, int which) {
				// TODO Auto-generated method stub
		AlertDialog alertDialog = alertDialogBuilder.create();
                // set the title for the dialog
                // Set the Icon for the Dialog

SourceCode Here

For more information please visit the following:
Happy alerting 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s