On my view I have a button which when pressed pops up a DatePickerDialog. The poppedup dialog has a \"Done\" button. When I press that button the selected date is populated
use following method, which is called when user presses Back button. This method is of Activity.
Activity
@Override public void onBackPressed() { // TODO Auto-generated method stub super.onBackPressed(); dialog.dismiss(); }