Commit 17aa27d6 authored by Bastien Zigmann's avatar Bastien Zigmann

MOBILE APP : Correctif du boutton retour

parent 3c46c8a7
......@@ -43,7 +43,25 @@ public class MainActivity extends AppCompatActivity {
if (wv.canGoBack()) {
wv.goBack();
} else {
super.onBackPressed();
// demander si on veut vraiment quitter et le faire si c'est le cas
final AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.MyDialogTheme);
builder.setMessage("Voulez-vous vraiment quitter?")
.setCancelable(false)
.setPositiveButton("Oui", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
MainActivity.super.onBackPressed();
}
})
.setNegativeButton("Non", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.cancel();
}
});
final AlertDialog alert = builder.create();
alert.show();
//super.onBackPressed();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment