A customizable calendar for android with customizable events and Range Selection Of dates.
Customizations:
Display events in different styles.
Customize the cells and events by extending the class BaseCellView.
Existing cells include CircularEventCellView, SquareCellView and EventCountCellView.
Choose whether to show dates outside month or not by setting the showDatesOutsideMonth
flag,
using FlexibleCalendarView#showDatesOutsideMonth()
method.
Set the first day of the week using FlexibleCalendarView#setStartDayOfTheWeek
method or through xml
by setting the attribute startDayOfTheWeek
.
Disable auto date selection on month change by using FlexibleCalendarView#disableAutoDateSelection
method or through xml by using disableAutoDateSelection
.
Navigate the calendar:
selectDate
- Scroll and select the provided date
goToCurrentDay
- Go the the current day
goToCurrentMonth
- Go the the current month
moveToNextDate
- Select the date after the current selection
moveToPreviousDate
- Select the date before the current selection
moveToNextMonth
- Move the view to the next month from the current visible month
moveToPreviousMonth
- Move the view to the previous month from the current visible month
Customizable display cells with different states:
state_date_regular
- Regular date
state_date_today
- Today's date
state_date_selected
- Selected date
state_date_outside_month
- Date lying outside month but in current month view
Sample cell background:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:flexible="http://schemas.android.com/apk/res-auto">
<item flexible:state_date_regular="true"
android:drawable="@drawable/cell_purple_background"/>
<item flexible:state_date_today="true"
android:drawable="@drawable/cell_gray_background"/>
<item flexible:state_date_selected="true"
android:drawable="@drawable/cell_red_background"/>
<item flexible:state_date_outside_month="true"
android:drawable="@drawable/cell_blue_background"/>
</selector>