-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlertDialog Builder.txt
22 lines (22 loc) · 1.27 KB
/
AlertDialog Builder.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setView(R.layout.dialog_edit_delete_id);
builder.setTitle("RanaG 4 U");
builder.setPositiveButton("Update", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Toast.makeText(ViewCategoryActivity.this, "Update clicked", Toast.LENGTH_SHORT).show();
}
});
builder.setNegativeButton("Delete", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Toast.makeText(ViewCategoryActivity.this, "delete clicked", Toast.LENGTH_SHORT).show();
}
});
builder.setNeutralButton("Back", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Toast.makeText(ViewCategoryActivity.this, "nuetral back clicked", Toast.LENGTH_SHORT).show();
}
});
builder.show();