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

xiaoxiao2021-02-28  95

完整内容,请查看: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

转载请注明原文地址: https://www.6miu.com/read-79088.html

最新回复(0)