Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas
Last active June 13, 2019 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PatilShreyas/33a0ecf470ac84a7c70ce901c3a5950c to your computer and use it in GitHub Desktop.
Save PatilShreyas/33a0ecf470ac84a7c70ce901c3a5950c to your computer and use it in GitHub Desktop.
MaterialDialog mDialog = new MaterialDialog.Builder(this)
.setTitle("Delete?")
.setMessage("Are you sure want to delete this file?")
.setCancelable(false)
.setPositiveButton("Delete", R.drawable.ic_delete, new MaterialDialog.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int which) {
// Delete Operation
}
})
.setNegativeButton("Cancel", R.drawable.ic_close, new MaterialDialog.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int which) {
dialogInterface.dismiss();
}
})
.build();
// Show Dialog
mDialog.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment