0
我有在创建日期选择器,我不知道为什么问题
....这是我使用的代码片段:为什么这个日期选择器不起作用?
private static final int DATE_PICKER_DIALOG = 800;
@Override
protected Dialog onCreateDialog(int id) {
switch (id) {
case DATE_PICKER_DIALOG:
final Calendar calendar = Calendar.getInstance();
return new DatePickerDialog(getApplicationContext(),
datePickerCallback, calendar.get(Calendar.YEAR), calendar
.get(Calendar.MONTH), calendar
.get(Calendar.DAY_OF_MONTH));
}
return null;
};
对话框被调用:
showDialog(DATE_PICKER_DIALOG)
这是抛出一个IllegalArgumntException:当前应该是> =开始和....
为什么呢?谢谢!
粘贴logcat并指向给出前的行。 – 2012-01-13 12:59:51
异常是我创建新对话框的地方 – 2012-01-13 13:17:02