CalendarView is a RecycleView based library.
Currently only the clone setup is available. The gradle build setup is in progress.
You can check the "sample" module to check common usage.
SDK:
minSdkVersion 15
Gradle:
classpath 'com.android.tools.build:gradle:2.1.0'
calendarViewInstance.setCalendarType(CalendarType.SINGLE_DATE);
app:app:type="single"
calendarViewInstance.setCalendarType(CalendarType.PERIOD);
app:app:type="period"
public void setPeriod(int months);
public void setDates(DateTime dateFrom, DateTime dateTo);
public void setWeekAnimation(@AnimRes int animation);
For each UI element there is a simple class with setters:
public WeekDayStyle setBgColorInactive(int bgColorInactive):
public WeekDayStyle setBgColorInterval(int bgColorInterval);
public WeekDayStyle setBgResource(int bgResource);
public WeekDayStyle setBgColorActive(int bgColorActive);
public WeekDayStyle setTextColorActive(int textColorActive);
public WeekDayStyle setTextSize(int textSize);
public WeekDayStyle setTextStyle(int textStyle);
public WeekDayStyle setTextGravity(int textGravity);
public WeekDayStyle setTextTypeface(int textTypeface);
public WeekDayStyle setTextAllCaps(boolean textAllCaps);
public WeekDayStyle setTextColorInactive(int textColorInactive);
public WeekStyle setBgColor(int bgColor);
public HeaderStyle setMonthNameTextTypeface(int monthNameTextTypeface);
public HeaderStyle setMonthNameTextColor(int monthNameTextColor);
public HeaderStyle setMonthNameTextSize(int monthNameTextSize);
public HeaderStyle setMonthNameTextStyle(int monthNameTextStyle);
public HeaderStyle setMonthNameTextGravity(int monthNameTextGravity);
public HeaderStyle setBgResID(int bgResID);
public HeaderStyle setBgColor(int bgColor);
public HeaderStyle setDayNameTextColor(int dayNameTextColor);
public HeaderStyle setDayNameTextSize(int dayNameTextSize);
public HeaderStyle setDayNameTextStyle(int dayNameTextStyle);
public HeaderStyle setDayNameTextGravity(int dayNameTextGravity);
public HeaderStyle setDayNameTextTypeface(int dayNameTextTypeface);
public HeaderStyle setDayNameTextAllCaps(boolean dayNameTextAllCaps);
app:BothDays_bgResource="@android:color/holo_blue_dark"
app:DestinationDay_bgResource="@android:color/holo_green_light"
app:DestinationDay_textAppearance="@style/CalendarView.DestinationTextAppearance"
app:Header_bgColor="@android:color/white"
app:Header_bgResID="@drawable/calendar_gradient"
app:Header_dayNameTextAppearance="@style/CalendarView.MonthDayNameTextAppearance"
app:Header_monthNameTextAppearance="@style/CalendarView.MonthNameTextAppearance"
app:OriginDay_bgResource="@android:color/holo_blue_bright"
app:OriginDay_textAppearance="@style/CalendarView.OriginTextAppearance"
app:WeekDay_bgColorActive="@android:color/white"
app:WeekDay_bgColorInactive="@android:color/white"
app:WeekDay_bgColorInterval="@color/calendar_background"
app:WeekDay_bgResource="@android:color/transparent"
app:WeekDay_textAppearance="@style/CalendarView.WeekDayTextAppearance"
app:WeekDay_textColorInactive="@color/calendar_numbers_inactive"
app:Week_bgColor="@android:color/white"
app:todayLabelText="@string/label_today"