Skip to content

Instantly share code, notes, and snippets.

@johnybot
Created March 9, 2015 21:38
Show Gist options
  • Save johnybot/0cd021d01934ce19d4f3 to your computer and use it in GitHub Desktop.
Save johnybot/0cd021d01934ce19d4f3 to your computer and use it in GitHub Desktop.
Destructive Dialog
AlertDialog alertDialog = new AlertDialog.Builder(
getActivity(),
R.style.AlertDialogCustom_Destructive)
.setPositiveButton(R.string.button_delete, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
// Delete Action
}
})
.setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
// Cancel Action
}
})
.setTitle(R.string.title_delete_item)
.create();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment