答案 0 :(得分:0)
您可以使用构建器构建自己的对话框:
new DatePickerDialog.Builder(this).setNegativeButton("Clear", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// they hit the clear button
}
});
答案 1 :(得分:0)
这应该可以解决您的要求:
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();