Ceci m'enlève l'erreur mais je ne sais absolument pas si c'est ce qu'il fallait faire et si ça va marcher pour la suite ... 
AlertDialog.Builder fenetre = new AlertDialog.Builder((Context) getParent());
EDIT
-------------------------------------------------------
Bon et bien ca fait tout planter 
Voilà le code entier que j'ai fais :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| LayoutInflater factory = LayoutInflater.from((Context) getParent());
final View alertDialogView = factory.inflate(R.layout.alertdialog, null);
AlertDialog.Builder fenetre = new AlertDialog.Builder((Context) getParent());
fenetre.setView(alertDialogView);
fenetre.setTitle("Répéter");
fenetre.setIcon(android.R.drawable.ic_dialog_alert);
fenetre.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
EditText et = (EditText)alertDialogView.findViewById(R.id.EditText1);
r = Integer.parseInt(et.getText().toString());
}});
fenetre.setNegativeButton("Annuler", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
r = 1;
}});
fenetre.show(); |
RE-EDIT
-----------------------------------------------------------------
En mettant
(MonActivityQuiGereLesImageView)getParent()
c'est la même chose. L'application plante.
Partager