Skip to content

Instantly share code, notes, and snippets.

@underhilllabs
Created May 21, 2010 00:41
Show Gist options
  • Save underhilllabs/408330 to your computer and use it in GitHub Desktop.
Save underhilllabs/408330 to your computer and use it in GitHub Desktop.
AlertDialog.Builder builder = new AlertDialog.Builder(NeedleView.this);
builder.setTitle(R.string.delete_dialog_title_needle)
.setMessage(R.string.delete_dialog_text_needle)
.setPositiveButton(R.string.dialog_button_delete, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
ndb.deleteNeedle(needleId);
Intent i2 = new Intent(NeedleView.this,KnittingStashHome.class);
i2.putExtra("com.underhilllabs.knitting.tabid",0);
startActivity(i2);
return;
} })
.setNegativeButton(R.string.dialog_button_cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
return;
}});
alertDialog = builder.create();
alertDialog.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment