SimplicityApks / ReminderDatePicker

A Google Keep-like Date and Time Picker for reminders
Apache License 2.0
74 stars 26 forks source link

How do I set a 24hours mode? (can't reopen the old one) #10

Closed chrisonline closed 9 years ago

chrisonline commented 9 years ago

Thanks for the new method, but it does not work for the time selection popup. If I set a SimpleDateFormat for 24 hour, for example HH:mm, it displays in the dropdown 21:00 and after selection 21:00 (correct) but the time popup selection is still 12 hour mode.

This is because the the creation of the TimePicker ist with DateFormat.is24HourFormat(context)! Is it possible to override this programatically?

// create the dialog to show later: timePickerDialog = TimePickerDialog.newInstance( new TimePickerDialog.OnTimeSetListener() { @Override public void onTimeSet(RadialPickerLayout radialPickerLayout, int hour, int minute) { setSelectedTime(hour, minute); } }, calendar.get(Calendar.HOUR_OF_DAY), calendar.get(Calendar.MINUTE), DateFormat.is24HourFormat(context), hasVibratePermission(context));

SimplicityApks commented 9 years ago

Reopened the other issue ( #9 ) and we'll keep the discussion there.