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));
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));