Android控件之DatePicker与TimePicker

来源:互联网 发布:淘宝防骗公告 编辑:程序博客网 时间:2024/05/01 18:51

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.

用法示例



0 0
原创粉丝点击