Two approaches to the harder problem (video)


#1

youtube.com/watch?v=hgECGjCdYYY
youtube.com/watch?v=hX5RHSsnDSE

I think the second approach is a bit trickier.


#2

Your time picker fragment maintains the selected date but the date picker fragment still resets the time to 0. Consider syncing up your implementation for the date picker dialog to save the previously-selected time, as well (simply store the hour/minute from the date and add it to the calendar constructor as you obviously did with the time picker fragment).

How did you end up implementing the first dialog with buttons instead of using the positive/negative dialog buttons? That was originally how I was trying to do it, but it’s late and I didn’t end up figuring out how to have the fragment remove itself on the OnClick listener while also sending a result back to the parent activity with the user’s selected option.