Hello. I created AlertDialog and have a problem with Negative Button Click. When i clicked it, i get an Fatal Error, i mean i have a problem with intent1. Thank you
Code:
public void onClick(DialogInterface dialog, int which) {
switch(which) {
case DialogInterface.BUTTON_POSITIVE:
Intent intent = new Intent (this, A.class);
startActivity(intent);
break;
case DialogInterface.BUTTON_NEGATIVE:
Intent intent1 = new Intent (this, A.class);
startActivity(intent1);
break;
}
}
Last edited by a moderator: