forked from hussien89aa/AndroidTutorialForBeginners
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlertDialog.java
More file actions
Latest commit
16 lines (16 loc) · 762 Bytes
/
Copy pathAlertDialog.java
File metadata and controls
16 lines (16 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
AlertDialog.Builderalert= newAlertDialog.Builder(this);
alert.setMessage("are you sure to delete")
.setIcon(android.R.drawable.stat_notify_error)
.setTitle("Alert")
.setPositiveButton("Yes", newDialogInterface.OnClickListener() {
@Override
publicvoidonClick(DialogInterfacedialog, intwhich) {
//do some thing
}
})
.setNegativeButton("No", newDialogInterface.OnClickListener() {
@Override
publicvoidonClick(DialogInterfacedialog, intwhich) {
//do some thing
}
}).show();