How to display Alert Dialog?

new AlertDialog.Builder(this)
.setTitle(“Title in alert dialog”)
.setMessage(“Message”)
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// continue with positive input
}
})
.setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// continue with negative input
}
})
.setIcon(android.R.drawable.ic_dialog_alert)
.show();

It's only fair to share...Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInEmail this to someoneBuffer this pageDigg thisFlattr the authorShare on StumbleUponPin on PinterestShare on YummlyShare on VKShare on RedditPrint this pageShare on Tumblr
Related Posts

One Comment

  1. redhead March 29, 2015 Reply

Add a Comment

Your email address will not be published. Required fields are marked *