Tuesday 12 February 2013

Create Time Picker Dialog in Android ?

// get the Calendar
Calendar c = Calendar.getInstance();

// get the Hour and Minute
int cHour = c.get(Calendar.HOUR_OF_DAY);
int cMinute = c.get(Calendar.MINUTE);

// create TimePicker Dialog
TimePickerDialog timePickerDialog = new TimePickerDialog(
TimePickerDialogDemoActivity.this, timeListener, cHour,
cMinute, false);

// show TimePicker Dialog
timePickerDialog.show();



No comments:

Post a Comment