]>
Commit | Line | Data |
---|---|---|
46e6c000 PT |
1 | package ro.ieval.unical; |
2 | ||
3 | import android.app.AlertDialog; | |
4 | import android.app.Dialog; | |
5 | import android.app.DialogFragment; | |
6 | import android.content.DialogInterface; | |
7 | import android.os.Bundle; | |
8 | ||
9 | public class deleteEventDialog extends DialogFragment { | |
10 | @Override | |
11 | public Dialog onCreateDialog(Bundle savedInstanceState) { | |
12 | // Use the Builder class for convenient dialog construction | |
13 | AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); | |
14 | builder.setMessage(R.string.askdeleteevent) | |
15 | .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { | |
16 | public void onClick(DialogInterface dialog, int id) { | |
17 | // FIRE ZE MISSILES! | |
18 | } | |
19 | }) | |
20 | .setNegativeButton(R.string.no, new DialogInterface.OnClickListener() { | |
21 | public void onClick(DialogInterface dialog, int id) { | |
22 | // User cancelled the dialog | |
23 | } | |
24 | }); | |
25 | // Create the AlertDialog object and return it | |
26 | return builder.create(); | |
27 | } | |
28 | } |