Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
211 views
in Technique[技术] by (71.8m points)

android - How to implement a customDatePicker () of MaterialDatePicker.Builder.customDatePicker ()

I have tried to implement a custom MaterialDatePicker calendar, but this method asks for a DateSelector, and I ask what is a DateSelector?

     /**
     * Sets the Builder's selection manager to the provided {@link DateSelector}.
     *
     * @hide
     */
    @RestrictTo(LIBRARY_GROUP)
    @NonNull
    public static <S> Builder<S> customDatePicker(@NonNull DateSelector<S> dateSelector) {
      return new Builder<>(dateSelector);
    }

This says the description of the Interface DateSelector

 /**
 * Interface for users of {@link MaterialCalendar<S>} to control how the Calendar displays and
 * returns selections.
 *
 * <p>Implementors must implement {@link Parcelable} so that selection can be maintained through
 * Lifecycle events (e.g., Fragment destruction).
 *
 * <p>Dates are represented as times in UTC milliseconds.
 *
 * @param <S> The type of item available when cells are selected in the {@link AdapterView}
 * @hide
 */
question from:https://stackoverflow.com/questions/65861925/how-to-implement-a-customdatepicker-of-materialdatepicker-builder-customdatep

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...