I am developing an activity which generate an AlertDialog and attach to it
an onClickListener which calls the finish() method, I am experiencing a
strange issue which
result is a kind of stalemate: pressing the *Ok* button finish() gets
called and I can see the onDestroy() being called by the system using
The activity is the only one in the stack therefore the system quits from
the app but when I start it again I can still see the AlertDialog (!) then
if I click
in the *Ok* button again I will exit.
Any ideas ?
AlertDialog.Builder builder = new AlertDialog.Builder(context);
AlertDialog dialog = builder.create();
DialogInterface.OnClickListener ok = new DialogInterface.OnClickListener()
public void onClick(DialogInterface dialog, int which)
dialog.setButton(Dialog.BUTTON_POSITIVE, "Ok", positiveBtnListener);
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
For more options, visit this group at
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@xxxxxxxxxxxxxxxx.
For more options, visit https://groups.google.com/d/optout.