I need to be able to choose date and time in my application
It should either be done by using a dialog, or starting a new intent.
The way I have done it now, is that I have started a new intent, since I need to set both date and time.
My problem is that I need to set the current date on the Datepicker
(This is possible with the Timepicker
using setCurrentHour
and setCurrentMinute
) onCreate, and set that as a lower boundary.
I can't find any functions in the Android API for doing this with the DatePicker
.
Anyone have a suggestion to solve this problem?
Thanks in advance!
Edit:
Important: The DatePicker
and TimePicker
must be in the same dialog/intent
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…