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

Viewed 87

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
 */
0 Answers
Related