【发布时间】:2016-02-22 11:24:43
【问题描述】:
我正在使用这个Example 创建 DatePicker,其中 setMinDate 的方法将第一个参数作为 Calendar 而不是 long,我想执行这个方法 datePicker.setMinDate(calendar.getTimeInMillis()- 1000);
如何在不改变方法结构的情况下将最后一个日期设为 Calendar 而不是 long?
DatePickerDialog中setMinDate的结构是:
public void setMinDate(Calendar calendar) {
mMinDate = calendar;
if (mDayPickerView != null) {
mDayPickerView.onChange();
}
}
提前致谢。
【问题讨论】:
-
你需要日期格式而不是long?
-
不,我需要日历格式
-
看版,我贴出方法结构。
标签: android datepicker