Problem with datepicker and timepicker
问题 Hi i put the code of the examples in android developers in the same classe but i have a problem in this @Override protected Dialog onCreateDialog(int id) { switch (id) { case DATE_DIALOG_ID: return new DatePickerDialog(this, mDateSetListener, mYear, mMonth, mDay); case TIME_DIALOG_ID: return new TimePickerDialog(this, mTimeSetListener, mHour, mMinute, false); } return null; } why i can't do this?? it only works with one case.. 回答1: when declaring static fields for DATE_DIALOG_ID and TIME