I have this code here on the options menu
Dialog dialog = new Dialog(ScheduleActivity.this);
dialog.setTitle(\"Add Event\");
dialog.setContentView(R.layout.
You can try this code.. it will surely helpful to u.. No Doubt!
protected Dialog onCreateDialog(int id) {
Calendar c=Calendar.getInstance();
int Sysday=c.get(Calendar.DAY_OF_MONTH);
int Sysmonth=c.get(Calendar.MONTH);
int Sysyear=c.get(Calendar.YEAR);
int Sysmin=c.get(Calendar.MINUTE);
int Syshour=c.get(Calendar.HOUR);
switch (id) {
case TIME_DIALOG:
return new TimePickerDialog(this, myTimePicker , Syshour, Sysmin, false);
case DATE_DIALOG:
return new DatePickerDialog(this, myDatePicker, Sysyear, Sysmonth, Sysday);
}
return null;
}