我正在使用通过按钮打开的 DatePickerDialog。如何在微调器中打开它们?
public void chooseDate(View v) {
new DatePickerDialog(Movimenti.this, d,
dateAndTime.get(Calendar.YEAR),
dateAndTime.get(Calendar.MONTH),
dateAndTime.get(Calendar.DAY_OF_MONTH))
.show();
} 私人无效更新标签() {
mDataScelta.setText(fmtDateAndTime.format(dateAndTime.getTime()));
}
DatePickerDialog.OnDateSetListener d=新 DatePickerDialog.OnDateSetListener() {
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
dateAndTime.set(Calendar.YEAR, year);
dateAndTime.set(Calendar.MONTH, monthOfYear);
dateAndTime.set(Calendar.DAY_OF_MONTH, dayOfMonth);
updateLabel();
}
};