EasyCalendar
Quickly customize the calendar UI. You can use EasyCalendar to quickly get the calendar style UI.
Feature
- Custom layout for title.
- Custom layout for date.
- Show or hide divider for date.
- Show or hide overflow date.
- Listen to date's view be clicked.
Screenshot
Gradle
compile 'com.sch.calendar:easy-calendar:1.0.1'
Attributes
name | format | description |
---|---|---|
titleColor | color | set color for title |
titleLayout | reference | custom layout for title |
weekColor | color | set color for week |
weekBackground | color|reference | set background for week bar |
monthBackground | color|reference | set backgroung for month layout |
dateDividerColor | color | set color for divider of date |
dateDividerSize | dimension | set size for divider of date |
imgLastMonth | reference | set image for button of last month |
imgNextMonth | reference | set image for button of next month |
language | enum | china: 中文, english: English |
API
- Show or hide overflow date.
- Set format for title.
- Set a listener for callback when date was clicked.
- Set a listener for callback when showing month changed.
- Set can or can't change month by drag.
- Set can or can't fling when finger off screen.
- Set the visibility of the button for the month of switch.
- Get view of today.
- Set the calendar size will wrap content or not.
Use this api you can set the calendar size will wrap content or not. if true, the layout's height will auto change with animation when month changed.
Custom UI for date
You can use default UI for date by SampleVagueAdapter. Default UI only show date.
You can custom UI for date by extend VagueAdapter , e.g. custom UI for checkin.