// Path: library/src/main/java/com/prolificinteractive/materialcalendarview/format/ArrayWeekDayFormatter.java
// public class ArrayWeekDayFormatter implements WeekDayFormatter {
// 
//   private final CharSequence[] weekDayLabels;
// 
//   /**
//    * @param weekDayLabels an array of 7 labels, starting with Sunday
//    */
//   public ArrayWeekDayFormatter(final CharSequence[] weekDayLabels) {
//     if (weekDayLabels == null) {
//       throw new IllegalArgumentException("Cannot be null");
//     }
//     if (weekDayLabels.length != 7) {
//       throw new IllegalArgumentException("Array must contain exactly 7 elements");
//     }
//     this.weekDayLabels = weekDayLabels;
//   }
// 
//   /**
//    * {@inheritDoc}
//    */
//   @Override public CharSequence format(final DayOfWeek dayOfWeek) {
//     return weekDayLabels[dayOfWeek.getValue() - 1];
//   }
// }
// 
// Path: library/src/main/java/com/prolificinteractive/materialcalendarview/format/DayFormatter.java
// public interface DayFormatter {
// 
//   /**
//    * Default format for displaying the day.
//    */
//   String DEFAULT_FORMAT = "d";
// 
//   /**
//    * Default implementation used by {@linkplain com.prolificinteractive.materialcalendarview.MaterialCalendarView}
//    */
//   DayFormatter DEFAULT = new DateFormatDayFormatter();
// 
//   /**
//    * Format a given day into a string
//    *
//    * @param day the day
//    * @return a label for the day
//    */
//   @NonNull String format(@NonNull CalendarDay day);
// }
// 
// Path: library/src/main/java/com/prolificinteractive/materialcalendarview/format/MonthArrayTitleFormatter.java
// public class MonthArrayTitleFormatter implements TitleFormatter {
// 
//   private final CharSequence[] monthLabels;
// 
//   /**
//    * Format using an array of month labels
//    *
//    * @param monthLabels an array of 12 labels to use for months, starting with January
//    */
//   public MonthArrayTitleFormatter(CharSequence[] monthLabels) {
//     if (monthLabels == null) {
//       throw new IllegalArgumentException("Label array cannot be null");
//     }
//     if (monthLabels.length < 12) {
//       throw new IllegalArgumentException("Label array is too short");
//     }
//     this.monthLabels = monthLabels;
//   }
// 
//   /**
//    * {@inheritDoc}
//    */
//   @Override
//   public CharSequence format(CalendarDay day) {
//     return new SpannableStringBuilder()
//         .append(monthLabels[day.getMonth() - 1])
//         .append(" ")
//         .append(String.valueOf(day.getYear()));
//   }
// }
// 
// Path: library/src/main/java/com/prolificinteractive/materialcalendarview/format/TitleFormatter.java
// public interface TitleFormatter {
// 
//   String DEFAULT_FORMAT = "LLLL yyyy";
// 
//   TitleFormatter DEFAULT = new DateFormatTitleFormatter();
// 
//   /**
//    * Converts the supplied day to a suitable month/year title
//    *
//    * @param day the day containing relevant month and year information
//    * @return a label to display for the given month/year
//    */
//   CharSequence format(CalendarDay day);
// }
// 
// Path: library/src/main/java/com/prolificinteractive/materialcalendarview/format/WeekDayFormatter.java
// public interface WeekDayFormatter {
//   /**
//    * Convert a given day of the week into a label.
//    *
//    * @param dayOfWeek the day of the week as returned by {@linkplain DayOfWeek#getValue()}.
//    * @return a label for the day of week.
//    */
//   CharSequence format(DayOfWeek dayOfWeek);
// 
//   /**
//    * Default implementation used by {@linkplain com.prolificinteractive.materialcalendarview.MaterialCalendarView}
//    */
//   WeekDayFormatter DEFAULT = new CalendarWeekDayFormatter();
// }


import android.annotation.SuppressLint;
import android.app.Service;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.ArrayRes;
import android.support.annotation.DrawableRes;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.prolificinteractive.materialcalendarview.format.ArrayWeekDayFormatter;
import com.prolificinteractive.materialcalendarview.format.DayFormatter;
import com.prolificinteractive.materialcalendarview.format.MonthArrayTitleFormatter;
import com.prolificinteractive.materialcalendarview.format.TitleFormatter;
import com.prolificinteractive.materialcalendarview.format.WeekDayFormatter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import org.threeten.bp.DayOfWeek;
import org.threeten.bp.LocalDate;
import org.threeten.bp.temporal.WeekFields;
   * @see #SHOW_NONE
   * @see #SHOW_DEFAULTS
   * @see #SHOW_OTHER_MONTHS
   * @see #SHOW_OUT_OF_RANGE
   * @see #SHOW_DECORATED_DISABLED
   */
  @ShowOtherDates
  public int getShowOtherDates() {
    return adapter.getShowOtherDates();
  }

  /**
   * @return true if allow click on days outside current month displayed
   */
  public boolean allowClickDaysOutsideCurrentMonth() {
    return allowClickDaysOutsideCurrentMonth;
  }

  /**
   * @return true if the week days names are shown
   */
  public boolean isShowWeekDays() {
    return showWeekDays;
  }

  /**
   * Set a custom formatter for the month/year title
   *
   * @param titleFormatter new formatter to use, null to use default formatter
   */
// Path: library/src/main/java/com/prolificinteractive/materialcalendarview/format/ArrayWeekDayFormatter.java
// public class ArrayWeekDayFormatter implements WeekDayFormatter {
// 
//   private final CharSequence[] weekDayLabels;
// 
//   /**
//    * @param weekDayLabels an array of 7 labels, starting with Sunday
//    */
//   public ArrayWeekDayFormatter(final CharSequence[] weekDayLabels) {
//     if (weekDayLabels == null) {
//       throw new IllegalArgumentException("Cannot be null");
//     }
//     if (weekDayLabels.length != 7) {
//       throw new IllegalArgumentException("Array must contain exactly 7 elements");
//     }
//     this.weekDayLabels = weekDayLabels;
//   }
// 
//   /**
//    * {@inheritDoc}
//    */
//   @Override public CharSequence format(final DayOfWeek dayOfWeek) {
//     return weekDayLabels[dayOfWeek.getValue() - 1];
//   }
// }
// 
// Path: library/src/main/java/com/prolificinteractive/materialcalendarview/format/DayFormatter.java
// public interface DayFormatter {
// 
//   /**
//    * Default format for displaying the day.
//    */
//   String DEFAULT_FORMAT = "d";
// 
//   /**
//    * Default implementation used by {@linkplain com.prolificinteractive.materialcalendarview.MaterialCalendarView}
//    */
//   DayFormatter DEFAULT = new DateFormatDayFormatter();
// 
//   /**
//    * Format a given day into a string
//    *
//    * @param day the day
//    * @return a label for the day
//    */
//   @NonNull String format(@NonNull CalendarDay day);
// }
// 
// Path: library/src/main/java/com/prolificinteractive/materialcalendarview/format/MonthArrayTitleFormatter.java
// public class MonthArrayTitleFormatter implements TitleFormatter {
// 
//   private final CharSequence[] monthLabels;
// 
//   /**
//    * Format using an array of month labels
//    *
//    * @param monthLabels an array of 12 labels to use for months, starting with January
//    */
//   public MonthArrayTitleFormatter(CharSequence[] monthLabels) {
//     if (monthLabels == null) {
//       throw new IllegalArgumentException("Label array cannot be null");
//     }
//     if (monthLabels.length < 12) {
//       throw new IllegalArgumentException("Label array is too short");
//     }
//     this.monthLabels = monthLabels;
//   }
// 
//   /**
//    * {@inheritDoc}
//    */
//   @Override
//   public CharSequence format(CalendarDay day) {
//     return new SpannableStringBuilder()
//         .append(monthLabels[day.getMonth() - 1])
//         .append(" ")
//         .append(String.valueOf(day.getYear()));
//   }
// }
// 
// Path: library/src/main/java/com/prolificinteractive/materialcalendarview/format/TitleFormatter.java
// public interface TitleFormatter {
// 
//   String DEFAULT_FORMAT = "LLLL yyyy";
// 
//   TitleFormatter DEFAULT = new DateFormatTitleFormatter();
// 
//   /**
//    * Converts the supplied day to a suitable month/year title
//    *
//    * @param day the day containing relevant month and year information
//    * @return a label to display for the given month/year
//    */
//   CharSequence format(CalendarDay day);
// }
// 
// Path: library/src/main/java/com/prolificinteractive/materialcalendarview/format/WeekDayFormatter.java
// public interface WeekDayFormatter {
//   /**
//    * Convert a given day of the week into a label.
//    *
//    * @param dayOfWeek the day of the week as returned by {@linkplain DayOfWeek#getValue()}.
//    * @return a label for the day of week.
//    */
//   CharSequence format(DayOfWeek dayOfWeek);
// 
//   /**
//    * Default implementation used by {@linkplain com.prolificinteractive.materialcalendarview.MaterialCalendarView}
//    */
//   WeekDayFormatter DEFAULT = new CalendarWeekDayFormatter();
// }


// Path: library/src/main/java/com/prolificinteractive/materialcalendarview/MaterialCalendarView.java
import android.annotation.SuppressLint;
import android.app.Service;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.ArrayRes;
import android.support.annotation.DrawableRes;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.prolificinteractive.materialcalendarview.format.ArrayWeekDayFormatter;
import com.prolificinteractive.materialcalendarview.format.DayFormatter;
import com.prolificinteractive.materialcalendarview.format.MonthArrayTitleFormatter;
import com.prolificinteractive.materialcalendarview.format.TitleFormatter;
import com.prolificinteractive.materialcalendarview.format.WeekDayFormatter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import org.threeten.bp.DayOfWeek;
import org.threeten.bp.LocalDate;
import org.threeten.bp.temporal.WeekFields;

   * @see #SHOW_NONE
   * @see #SHOW_DEFAULTS
   * @see #SHOW_OTHER_MONTHS
   * @see #SHOW_OUT_OF_RANGE
   * @see #SHOW_DECORATED_DISABLED
   */
  @ShowOtherDates
  public int getShowOtherDates() {
    return adapter.getShowOtherDates();
  }

  /**
   * @return true if allow click on days outside current month displayed
   */
  public boolean allowClickDaysOutsideCurrentMonth() {
    return allowClickDaysOutsideCurrentMonth;
  }

  /**
   * @return true if the week days names are shown
   */
  public boolean isShowWeekDays() {
    return showWeekDays;
  }

  /**
   * Set a custom formatter for the month/year title
   *
   * @param titleFormatter new formatter to use, null to use default formatter
   */
  public void setTitleFormatter(@Nullable TitleFormatter titleFormatter) {