I want to add new button,which is clear button, to date picker widget and time picker widget in my android application. In default, these widgets have two button,set and cancel. How can I add one more button to these two button
Is it possible? If yes, can you give some example?
Thanks
Just add a neutral button.
DatePickerDialog dialog = new DatePickerDialog(context, 0, callback, year, month, day);
dialog.setButton(DialogInterface.BUTTON_NEUTRAL, "Name", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//Your code
}
});