diff options
| author | Alan Viverette <alanv@google.com> | 2014-11-24 14:07:24 -0800 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2014-11-24 14:07:24 -0800 |
| commit | d25eb9fbb9d659aab5e8ea25d16cb8bcb458a1a9 (patch) | |
| tree | 57455e82bcfaa31a7bc42ce7e88f31aad3bdb826 /core/java/android/widget/DatePicker.java | |
| parent | 29dc496a42d49a37dcd99c0465f3cec18a47e6ff (diff) | |
Update documentation for DatePicker to reflect the new mode
BUG: 18508605
Change-Id: I23d45bf1cd7783fa6f397c15f0ba6802e4069d6b
Diffstat (limited to 'core/java/android/widget/DatePicker.java')
| -rw-r--r-- | core/java/android/widget/DatePicker.java | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java index 3e4eb021b565..0ca08e1a0bf7 100644 --- a/core/java/android/widget/DatePicker.java +++ b/core/java/android/widget/DatePicker.java @@ -51,12 +51,19 @@ import java.util.TimeZone; import libcore.icu.ICU; /** - * This class is a widget for selecting a date. The date can be selected by a - * year, month, and day spinners or a {@link 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. Also the minimal and maximal date from which dates to be selected - * can be customized. + * Provides a widget for selecting a date. + * <p> + * When the {@link android.R.styleable#DatePicker_datePickerMode} attribute is + * set to {@code spinner}, the date can be selected using year, month, and day + * spinners or a {@link 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. + * </p> + * <p> + * When the {@link android.R.styleable#DatePicker_datePickerMode} attribute is + * set to {@code calendar}, the month and day can be selected using a + * calendar-style view while the year can be selected separately using a list. + * </p> * <p> * See the <a href="{@docRoot}guide/topics/ui/controls/pickers.html">Pickers</a> * guide. @@ -80,6 +87,7 @@ import libcore.icu.ICU; * @attr ref android.R.styleable#DatePicker_yearListItemTextAppearance * @attr ref android.R.styleable#DatePicker_yearListSelectorColor * @attr ref android.R.styleable#DatePicker_calendarTextColor + * @attr ref android.R.styleable#DatePicker_datePickerMode */ @Widget public class DatePicker extends FrameLayout { @@ -357,6 +365,10 @@ public class DatePicker extends FrameLayout { /** * Gets the {@link CalendarView}. + * <p> + * This method returns {@code null} when the + * {@link android.R.styleable#DatePicker_datePickerMode} attribute is set + * to {@code calendar}. * * @return The calendar view. * @see #getCalendarViewShown() @@ -367,6 +379,10 @@ public class DatePicker extends FrameLayout { /** * Sets whether the {@link CalendarView} is shown. + * <p> + * Calling this method has no effect when the + * {@link android.R.styleable#DatePicker_datePickerMode} attribute is set + * to {@code calendar}. * * @param shown True if the calendar view is to be shown. */ |
