Made by Applikey Solutions
compile 'com.github.applikeysolutions:cosmocalendar:1.0.1'
- calendarOrientation - Possible values: HORIZONTAL, VERTICAL
- calendarBackgroundColor
- monthTextColor
- otherDayTextColor
- dayTextColor
- firstDayOfTheWeek
- weekDayTitleTextColo
- showDaysOfWeek - Defines if we need to display week day titles for every month
- showDaysOfWeekTitle - Defines if we need to display week day title for whole calendar
- selectionType - Possible values: SINGLE, MULTIPLE, RANGE
- selectedDayTextColor
- selectedDayBackgroundColor
- selectedDayBackgroundStartColor - Background color of START day from selected range
- selectedDayBackgroundEndColor - Background color of END day from selected range
- selectionBarMonthTextColor
- currentDayTextColor
- currentDayIconRes
- currentDaySelectedIconRes
- previousMonthIconRes
- nextMonthIconRes
- weekendDays
calendarView.setWeekendDays(new HashSet(){{
add(Calendar.THURSDAY);
add(Calendar.TUESDAY);
}});
- weekendDayTextColor
You can add some days for example holidays:
Set<Long> connectedDaysSet = new HashSet<>();
connectedDaysSet.add(System.currentTimeMillis());
calendarView.setConnectedCalendarDays(connectedDaysSet);
and customize them:
- connectedDayTextColor
- connectedDaySelectedTextColor
- connectedDayIconRes;
- connectedDaySelectedIconRes;
- connectedDayIconPosition (TOP/BOTTOM);
calendarView.setConnectedDayIconPosition(ConnectedDayIconPosition.TOP);
You can add days so that you can not select them:
Set<Long> disabledDaysSet = new HashSet<>();
disabledDaysSet.add(System.currentTimeMillis());
calendarView.setDisabledDays(disabledDaysSet);
- month criteria range:
calendarView.setDisabledDaysCriteria(new DisabledDaysCriteria(1, 5, DisabledDaysCriteriaType.DAYS_OF_MONTH)); //from 1st to 5th day of the month
- week criteria range:
calendarView.setDisabledDaysCriteria(new DisabledDaysCriteria(1, 5, DisabledDaysCriteriaType.DAYS_OF_MONTH)); //from 1st to 5th day of the month
- disabledDayTextColor - Text color of disabled day
new CalendarDialog(this, new OnDaysSelectionListener() {
@Override
public void onDaysSelected(List<Day> selectedDays) {
}
}).show();
Single Choice | Multiple |
---|---|
Range | Customized |
MIT License
Copyright (c) 2017 Applikey Solutions
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.