All Projects → p-v → Flexiblecalendar

p-v / Flexiblecalendar

Licence: mit
A flexible android calendar

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Flexiblecalendar

Air Datepicker
Lightweight, dependency-free JavaScript datepicker.
Stars: ✭ 1,913 (+999.43%)
Mutual labels:  calendar
Time
Building a better date/time library for Swift
Stars: ✭ 1,983 (+1039.66%)
Mutual labels:  calendar
React Datepicker
📅 React DatePicker Library (Flexible, Reusable)
Stars: ✭ 165 (-5.17%)
Mutual labels:  calendar
Time To Leave
Log work hours and get notified when it's time to leave the office and start to live.
Stars: ✭ 155 (-10.92%)
Mutual labels:  calendar
Ionic Calendar
A calendar directive for Ionic framework
Stars: ✭ 160 (-8.05%)
Mutual labels:  calendar
Bonsai
Self-hosted family wiki engine / photoalbum
Stars: ✭ 162 (-6.9%)
Mutual labels:  calendar
Chinese Lunar Calendar For Mac
Chinese Lunar Calendar for Mac
Stars: ✭ 150 (-13.79%)
Mutual labels:  calendar
Lunar Java
无第三方依赖的公历(阳历)和农历(阴历、老黄历)工具,支持节假日、星座、儒略日、干支、生肖、节气、节日、彭祖百忌、每日宜忌、吉神宜趋凶煞宜忌、吉神(喜神/福神/财神/阳贵神/阴贵神)方位、胎神方位、冲煞、纳音、星宿、八字、五行、十神、建除十二值星、青龙名堂等十二神、黄道黑道日及吉凶等。lunar is a calendar library for Solar and Chinese Lunar.
Stars: ✭ 166 (-4.6%)
Mutual labels:  calendar
Kvkcalendar
A most fully customization calendar and timeline library for iOS 📅
Stars: ✭ 160 (-8.05%)
Mutual labels:  calendar
Things Calendar
Simple but elegant datepicker for the web — inspired by Things for mac
Stars: ✭ 165 (-5.17%)
Mutual labels:  calendar
Diary
Android personal diary - forked from http://git.savannah.gnu.org/cgit/diary.git
Stars: ✭ 158 (-9.2%)
Mutual labels:  calendar
Xamarin.plugin.calendar
Calendar plugin for Xamarin.Forms
Stars: ✭ 159 (-8.62%)
Mutual labels:  calendar
Meetingbar
Your next meeting always before your eyes in the macOS menu bar
Stars: ✭ 2,621 (+1406.32%)
Mutual labels:  calendar
Calendar Ios
Calendar View
Stars: ✭ 154 (-11.49%)
Mutual labels:  calendar
Vue Hash Calendar
移动端日期、时间选择插件,日期选择面板以日历形式展示。上下滑动切换周/月模式。支持两种模式:1,月模式,左右滑动切换月份。2、周模式,左右滑动切换周。
Stars: ✭ 163 (-6.32%)
Mutual labels:  calendar
Wx calendar
微信小程序-日历组件 📅
Stars: ✭ 2,008 (+1054.02%)
Mutual labels:  calendar
Toast Ui.vue Calendar
Toast UI Calendar for Vue
Stars: ✭ 162 (-6.9%)
Mutual labels:  calendar
Calendar Heatmap
📊 Calendar heatmap graph
Stars: ✭ 170 (-2.3%)
Mutual labels:  calendar
Rrule
JavaScript library for working with recurrence rules for calendar dates as defined in the iCalendar RFC and more.
Stars: ✭ 2,249 (+1192.53%)
Mutual labels:  calendar
Xk Time
xk-time 是时间转换,时间计算,时间格式化,时间解析,日历,时间cron表达式和时间NLP等的工具,使用Java8,线程安全,简单易用,多达70几种常用日期格式化模板,支持Java8时间类和Date,轻量级,无第三方依赖。
Stars: ✭ 162 (-6.9%)
Mutual labels:  calendar

FlexibleCalendar

Join the chat at https://gitter.im/p-v/FlexibleCalendar Android Arsenal

A customizable calendar for android with customizable events.

Demo

Gradle

Add dependencies in build.gradle,

dependencies {
    compile 'com.p_v:flexiblecalendar:1.2.1'
}

Customize FlexibleCalendar using the CalendarView interface

calendarView.setCalendarView(new FlexibleCalendarView.CalendarView() {
    @Override
    public BaseCellView getCellView(int position, View convertView, ViewGroup parent, int cellType) {
        //customize the date cells
        BaseCellView cellView = (BaseCellView) convertView;
        if (cellView == null) {
            LayoutInflater inflater = LayoutInflater.from(CalendarActivity4.this);
            cellView = (BaseCellView) inflater.inflate(R.layout.calendar3_date_cell_view, null);
        }
        if (cellType == BaseCellView.TODAY){
            cellView.setTextColor(getResources().getColor(android.R.color.holo_red_dark));
            cellView.setTextSize(15);
        } else {
            cellView.setTextColor(getResources().getColor(android.R.color.white));
            cellView.setTextSize(12);
        }
        return cellView;
    }
    @Override
    public BaseCellView getWeekdayCellView(int position, View convertView, ViewGroup parent) {
        //customize the weekday header cells
        BaseCellView cellView = (BaseCellView) convertView;
        if (cellView == null) {
            LayoutInflater inflater = LayoutInflater.from(CalendarActivity4.this);
            cellView = (BaseCellView) inflater.inflate(R.layout.calendar3_week_cell_view, null);
            cellView.setBackgroundColor(getResources().getColor(android.R.color.holo_purple));
            cellView.setTextColor(getResources().getColor(android.R.color.holo_orange_light));
            cellView.setTextSize(18);
        }
        return cellView;
    }
    @Override
    public String getDayOfWeekDisplayValue(int dayOfWeek, String defaultValue) {
        return String.valueOf(defaultValue.charAt(0));
    }
});

Display events for a day using the EventDataProvider

calendarView.setEventDataProvider(new FlexibleCalendarView.EventDataProvider() {
    @Override
    public List<? extends Event> getEventsForTheDay(int year, int month, int day) {
        return getEventColorList(year,month,day);
    }
});

Track the month change event by setting the OnMonthChangeListener

calendarView.setOnMonthChangeListener(new FlexibleCalendarView.OnMonthChangeListener() {
    @Override
    public void onMonthChange(int year, int month, int direction) {
        //do things on month change
    }
});

Customizations:

Display events in different styles.

Circular Multiple Events   Events with count

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.

Outside Month   Without Outside Month

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>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].