9f0e5ffc
JLo'w
Un petit popup de...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package com.example.app_10p5;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;
/**
* Created by Jean-loup Beaussart on 07/05/2016.
*/
public class Dialogue extends DialogFragment {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Use the Builder class for convenient dialog construction
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
49bd44b3
JLo'w
Alerte à l'expira...
|
17
|
builder.setCancelable(false);
|
9f0e5ffc
JLo'w
Un petit popup de...
|
18
19
20
21
22
23
24
25
|
builder.setMessage("Session expirée")
.setPositiveButton("ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
MainActivite parent = (MainActivite) getActivity();
parent.disconnect();
}
});
// Create the AlertDialog object and return it
|
49bd44b3
JLo'w
Alerte à l'expira...
|
26
27
28
|
Dialog d = builder.create();
d.setCanceledOnTouchOutside(false);
return d;
|
9f0e5ffc
JLo'w
Un petit popup de...
|
29
30
|
}
}
|