Skip to content

Instantly share code, notes, and snippets.

@7fe
Created February 23, 2017 22:57
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 7fe/c815f2bb0a1b60c2d30ceb5d2eba227d to your computer and use it in GitHub Desktop.
Save 7fe/c815f2bb0a1b60c2d30ceb5d2eba227d to your computer and use it in GitHub Desktop.
@Override protected void onResume(){
super.onResume();
AlertDialog.Builder builder1 = new AlertDialog.Builder(getApplicationContext());
builder1.setMessage("Write your message here.");
builder1.setCancelable(true);
builder1.setPositiveButton(
"Yes",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
builder1.setNegativeButton(
"No",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
AlertDialog alert11 = builder1.create();
alert11.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment