use of android.app.TimePickerDialog in project Etar-Calendar by Etar-Group.
the class SnoozeDelayActivity method onPrepareDialog.
@Override
protected void onPrepareDialog(int id, Dialog d) {
if (id == DIALOG_DELAY) {
TimePickerDialog tpd = (TimePickerDialog) d;
int delayMinutes = (int) (Utils.getDefaultSnoozeDelayMs(this) / (60L * 1000L));
int hours = delayMinutes / 60;
int minutes = delayMinutes % 60;
tpd.updateTime(hours, minutes);
}
super.onPrepareDialog(id, d);
}
Aggregations