1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
final AlertDialog.Builder alert = new AlertDialog.Builder(context,R.style.AlertDialogStyle);
final AlertDialog OptionDialog = alert.create();
alert.setView(alertDialogView);
alert.setTitle("Données absentes");
alert.setIcon(android.R.drawable.ic_dialog_alert);
alert.setCancelable(true);
alert.setPositiveButton("Télécharger", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
new DownloadfromInternet().execute(file_url);
OptionDialog.dismiss();
}
});
alert.setNegativeButton("Annuler", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
OptionDialog.cancel();
}
});
alert.show(); |
Partager