Merge "Update documentation for DatePicker to reflect the new mode" into lmp-mr1-dev

This commit is contained in:
Alan Viverette
2014-11-25 00:50:49 +00:00
committed by Android (Google) Code Review

View File

@@ -51,12 +51,19 @@ import java.util.TimeZone;
import libcore.icu.ICU; import libcore.icu.ICU;
/** /**
* This class is a widget for selecting a date. The date can be selected by a * Provides a widget for selecting a date.
* year, month, and day spinners or a {@link CalendarView}. The set of spinners * <p>
* and the calendar view are automatically synchronized. The client can * When the {@link android.R.styleable#DatePicker_datePickerMode} attribute is
* customize whether only the spinners, or only the calendar view, or both to be * set to {@code spinner}, the date can be selected using year, month, and day
* displayed. Also the minimal and maximal date from which dates to be selected * spinners or a {@link CalendarView}. The set of spinners and the calendar
* can be customized. * 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> * <p>
* See the <a href="{@docRoot}guide/topics/ui/controls/pickers.html">Pickers</a> * See the <a href="{@docRoot}guide/topics/ui/controls/pickers.html">Pickers</a>
* guide. * guide.
@@ -80,6 +87,7 @@ import libcore.icu.ICU;
* @attr ref android.R.styleable#DatePicker_yearListItemTextAppearance * @attr ref android.R.styleable#DatePicker_yearListItemTextAppearance
* @attr ref android.R.styleable#DatePicker_yearListSelectorColor * @attr ref android.R.styleable#DatePicker_yearListSelectorColor
* @attr ref android.R.styleable#DatePicker_calendarTextColor * @attr ref android.R.styleable#DatePicker_calendarTextColor
* @attr ref android.R.styleable#DatePicker_datePickerMode
*/ */
@Widget @Widget
public class DatePicker extends FrameLayout { public class DatePicker extends FrameLayout {
@@ -357,6 +365,10 @@ public class DatePicker extends FrameLayout {
/** /**
* Gets the {@link CalendarView}. * 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. * @return The calendar view.
* @see #getCalendarViewShown() * @see #getCalendarViewShown()
@@ -367,6 +379,10 @@ public class DatePicker extends FrameLayout {
/** /**
* Sets whether the {@link CalendarView} is shown. * 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. * @param shown True if the calendar view is to be shown.
*/ */