Affichage dans un AlertDialog
Bonjour
J'ai créé un AlertDialog personnalisé avec un bouton + un bouton moins et un EditText.
un clic sur le bouton + ou - affiche 1 dans l'EditText
Quand je teste, il n'y as pas d'affichage
Voici mon code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| buttonP = (Button) alertDialogView.findViewById(R.id.btn_plus);
buttonM = (Button) alertDialogView.findViewById(R.id.btn_moins);
// final EditText textNbre = (EditText) alertDialogView.findViewById(R.id.editNbre);
buttonP.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
PlusClick();
}
private void PlusClick() {
nbreText="1";
editTotal=(EditText) alertDialogView.findViewById(R.id.editNbre);
editTotal.setText(nbreText);
}
}); |
Je ne vois pas où est l'erreur
Merci pour vos réponses