Closed tzachi-dar closed 8 years ago
This is a behaviour I would really dislike.
First I choose the date, then I choose the time... and then I have to correct the date again as the time picker changed the date. With the additional problem that you can't see the when you have scrolled down to the hour picker on small devices you can't see the date picker.
A possibility could be to have the time picker above the date picker?
OK, replaced the order, time is now first.
Please let me know if this looks good.
Today I would have fallen for this trap again :/
I sometimes start the sensor just a bit over 24 hours after insertion - sometimes I wait 48 hours until I switch transmitters.
The bad translation and handling of "am" and "pm" and that 16:00 can be before 10:00 (and therefore cause a day jump) certainly has it's influence. Could you make the spinner adopt to 24 hour format, please?
If I'm not mistaken, tp.setIs24HourView(android.text.format.DateFormat.is24HourFormat(getApplicationContext()));
in onCreate()
should suffice. (Not tested, not written in an IDE.)
I'll change that to 24 hours format, and if you fill it is still problematic I can add a checkbox saying link the date and time pickers. Since it will only be in this dialog it will not add anything else to the settings.
OK, made the time viewer use 24 hour format.
I'm fine with always 24h format. But how about the US guys?
android.text.format.DateFormat.is24HourFormat(getApplicationContext())
should return true
if the user setting in the phone are 24h format and false
otherwise.
I thought that you wanted to always have it to 24 hours. what are the setting on your phone?
OK, fixed it to match the settings on the phone.
Ok, seems that setting the picker to use 24 hours format was causing a crash when rotating the phone when the dialog was opened.
following http://stackoverflow.com/questions/25880638/rotating-android-device-while-viewing-dialog-preference-with-timepicker-or-numbe, the fix was trivial.
Also added a button to make this entire "feature" optional.
Please let me know if there are any more comments.
Signed-off-by: Tzachi Dar tzachi.dar@gmail.com
Simple code to make sure that on start sensor the two pickers work together.
This is something that was annoying me from day one, happy to finally fix it.