How to handle Back button with in the dialog?
You need to override OnCancel
method. This method calls on Back Key press. Here's code which works perfect to me.
AlertDialog alertDialog; alertDialog.setOnCancelListener(new OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { // TODO Auto-generated method stub dialog.dismiss(); }});
Hope this will help you, and accept it if it is helpful to you.
Thanks..