Android7.0中文文档(API)--- DatePicker

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/DatePicker.html

DatePicker

public class DatePicker
extends FrameLayout

java.lang.Object
   ↳android.view.View
    ↳android.view.ViewGroup
     ↳android.widget.FrameLayout
      ↳android.widget.DatePicker


Provides a widget for selecting a date.
一个选择日期的控件。

When the DatePicker_datePickerMode attribute is set to spinner, the date can be selected using year, month, and day spinners or a CalendarView. The set of spinners and the calendar view are automatically synchronized. The client can customize whether only the spinners, or only the calendar view, or both to be displayed.
DatePicker_datePickerMode属性设置为spinner时,可以使用年,月,日Spinner或CalendarView来选择日期。这几个spinner和日历视图自动同步。使用者可以自定义是否只有spinner,或者只有日历视图,或者两者都显示。

When the DatePicker_datePickerMode attribute is set to calendar, the month and day can be selected using a calendar-style view while the year can be selected separately using a list.
DatePicker_datePickerMode属性设置为calendar时,可以使用日历样式的视图来选择月份和日期,并使用一个列表来单独选择年份。

See the Pickers guide.
请参考Pickers

For a dialog using this view, see DatePickerDialog.
使用此视图的一个对话框,请参考DatePickerDialog

摘要


嵌套类

interfaceDatePicker.OnDateChangedListener

The callback used to indicate the user changed the date. 
用于监听用户改变日期的回调。 

XML属性

android:calendarTextColor日历列表的文本颜色。 
android:calendarViewShown是否显示 "日历" 视图。 
android:datePickerMode设定widget的外观。 
android:dayOfWeekBackground头部标题上显示的一周的背景颜色。 
android:dayOfWeekTextAppearance头部标题上显示的一周的文本颜色。 
android:endYear最后一年 (包含), 例如 "2010"。 
android:firstDayOfWeek设置Calendar的一周的第一天。 
android:headerBackground已选择日期的页眉的背景。 
android:headerDayOfMonthTextAppearance选定日期页眉中月份日的文本外观。(例如:28) 
android:headerMonthTextAppearance选定日期页眉中月份的文本外观。(例如:五月) 
android:headerYearTextAppearance选定日期页眉中年份的文本外观。(如:2014)。 
android:maxDate此日历视图显示的最大日期(mm/dd/yyyy格式)。 
android:minDate此日历视图显示的最小日期(mm/dd/yyyy格式)。 
android:spinnersShown是否显示spinner。 
android:startYear第一年 (包含), 例如 "1940"。 
android:yearListItemTextAppearance显示年的列表中的文本外观。 
android:yearListSelectorColor显示年的列表中已被选择的项的外框的颜色。 

继承XML属性

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/DatePicker.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值