Last active
June 23, 2016 15:36
-
-
Save yahyaahrika/877985f85ce9b0e5b324d9645e268af4 to your computer and use it in GitHub Desktop.
Alert Message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DialogInterface.OnClickListener dialogClickListener = | |
new DialogInterface.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialog, int button) { | |
if (button == DialogInterface.BUTTON_POSITIVE) { | |
//Insert Data management code here | |
Toast.makeText(MainActivity.this, | |
getString(R.string.all_deleted), | |
Toast.LENGTH_SHORT).show(); | |
} | |
} | |
}; | |
AlertDialog.Builder builder = new AlertDialog.Builder(this); | |
builder.setMessage(getString(R.string.are_you_sure)) | |
.setPositiveButton(getString(android.R.string.yes), dialogClickListener) | |
.setNegativeButton(getString(android.R.string.no), dialogClickListener) | |
.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment