In datePickerDialog how to replace the cancel button by a clear button ? and catch the event when we click on it ?
This should solve your requirement:
DatePickerDialog datePickerDialog = new DatePickerDialog(
this, null, 2000, 1, 1);
datePickerDialog.setButton(android.content.DialogInterface.BUTTON_NEGATIVE,
getString(R.string.your_text), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// todo on click
}
});
datePickerDialog.show();