DatePicker
参数说明
android.app.DatePickerDialog.DatePickerDialog(Context context, OnDateSetListener callBack, int year, int monthOfYear, int dayOfMonth)
Parameters:
context The context the dialog is to run in.
callBack How the parent is notified that the date is set.
year The initial year of the dialog.
monthOfYear The initial month of the dialog.
dayOfMonth The initial day of the dialog.
用法示例
TimePicker
参数说明
Open Declaration android.app.TimePickerDialog.TimePickerDialog(Context context, OnTimeSetListener callBack, int hourOfDay, int minute, boolean is24HourView)
Parameters:
context Parent.
callBack How parent is notified.
hourOfDay The initial hour.
minute The initial minute.
is24HourView Whether this is a 24 hour view, or AM/PM.
Parameters:
context Parent.
callBack How parent is notified.
hourOfDay The initial hour.
minute The initial minute.
is24HourView Whether this is a 24 hour view, or AM/PM.
用法示例