Commit 49bd44b3a816a129bae1bee6c32ce4e9d6177183

Authored by JLo'w
1 parent 9f0e5ffc

Alerte à l'expiration ne peut plus être dismiss

PremiereActivite/app/src/main/java/com/example/app_10p5/Dialogue.java
@@ -14,6 +14,7 @@ public class Dialogue extends DialogFragment { @@ -14,6 +14,7 @@ public class Dialogue extends DialogFragment {
14 public Dialog onCreateDialog(Bundle savedInstanceState) { 14 public Dialog onCreateDialog(Bundle savedInstanceState) {
15 // Use the Builder class for convenient dialog construction 15 // Use the Builder class for convenient dialog construction
16 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); 16 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
  17 + builder.setCancelable(false);
17 builder.setMessage("Session expirée") 18 builder.setMessage("Session expirée")
18 .setPositiveButton("ok", new DialogInterface.OnClickListener() { 19 .setPositiveButton("ok", new DialogInterface.OnClickListener() {
19 public void onClick(DialogInterface dialog, int id) { 20 public void onClick(DialogInterface dialog, int id) {
@@ -22,6 +23,8 @@ public class Dialogue extends DialogFragment { @@ -22,6 +23,8 @@ public class Dialogue extends DialogFragment {
22 } 23 }
23 }); 24 });
24 // Create the AlertDialog object and return it 25 // Create the AlertDialog object and return it
25 - return builder.create(); 26 + Dialog d = builder.create();
  27 + d.setCanceledOnTouchOutside(false);
  28 + return d;
26 } 29 }
27 } 30 }