Skip to content

Instantly share code, notes, and snippets.

@hitapia
Created December 20, 2015 03:33
Show Gist options
  • Select an option

  • Save hitapia/bdfdf86276e37386a89f to your computer and use it in GitHub Desktop.

Select an option

Save hitapia/bdfdf86276e37386a89f to your computer and use it in GitHub Desktop.
Confirm Alert - Android
private void someConfirm(){
new AlertDialog.Builder(new ContextThemeWrapper(getContext(), android.R.style.Theme_Material_Dialog_Alert))
.setMessage("정말로?")
.setNegativeButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
//TODO~
}
})
.setPositiveButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
//TODO ~
}
}).create().show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment