I did not notice this problem until I came across this question. There is a simple solution: When the user does the date and time change in my application, I just call finish () and in onPause () or onStop () or onDestroy () I do this:
// force the timepicker to loose focus and the typed value is available ! timePicker.clearFocus(); // re-read the values, in my case i put them in a Time object. time.hour = timePicker.getCurrentHour(); time.minute = timePicker.getCurrentMinute();
After that, I save the time.toMillis (false) value in the corresponding column of my table.
I don't know if timepicker is available in your onDialogClosed (boolean positiveResult). If not, find another callback that will be used when it is still there.
Hope this helps.
Larphoid Nov 09 '10 at 13:53 2010-11-09 13:53
source share