i am using following example of date picker
http://developer.android.com/guide/tutorials/views/hello-datepicker.html
now i want to perform some functionality
DatePickerDialog now exposes a onCancel listener.
DatePickerDialog datePickerDialog = DatePickerDialog.newInstance(new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePickerDialog datePickerDialog, int year, int month, int day) {
// Do whatever you want when the date is selected.
editText.setText(String.format("%04d-%02d-%02d", year, month+1, day));
}
}, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH),calendar.get(Calendar.DAY_OF_MONTH));
datePickerDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
}
});