materialcalendar
materialcalendar copied to clipboard
A Material design back port of Android's CalendarView. Based on https://github.com/prolificinteractive/material-calendarview
Material Calendar
A Material design back port of Android's CalendarView. The goal is to have a Material look and feel, rather than 100% parity with the platform's implementation. The goal of this project is to rewrite original library in kotlin and make it more extendable and flexible.
![Range selection mode with BottomSheet](https://github.com/shuhart/materialcalendar/raw/master/images/bottomsheet.gif)
Usage
- Add mavenCentral() to repositories block in your root gradle file.
- Add
compile 'com.github.shuhart:material-calendar:1.1.0'
to your dependencies. - Add
MaterialCalendarView
into your layouts or view hierarchy. - Look into the sample for additional details on how to use and configure the library.
Example:
<com.shuhart.materialcalendarview.MaterialCalendarView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/calendarView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:mcv_showOtherDates="all"
app:mcv_selectionColor="#00F"
/>
Documentation
Make sure to check all the documentation available here.
Customization
One of the aims of this library is to be customizable. The many options include:
- Define the view's width and height in terms of tile size
- Single or Multiple date selection, or disabling selection entirely
- Showing dates from other months or those out of range
- Setting the first day of the week
- Show only a range of dates
- Customize the top bar
- Custom labels for the header, weekdays, or individual days
Events, Highlighting, Custom Selectors, and More!
All of this and more can be done via the decorator api. Please check out the decorator documentation.
Custom Selectors and Colors
If you provide custom drawables or colors, you'll want to make sure they respond to state. Check out the documentation for custom states.
Contributing
Would you like to contribute? Fork us and send a pull request! Be sure to checkout our issues first.