All Projects → JonasWanke → com.jonaswanke.calendar

JonasWanke / com.jonaswanke.calendar

Licence: Apache-2.0 license
📅 Material Design CalendarView for Android

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to com.jonaswanke.calendar

Custom Calendar View
The CustomCalendarView provides an easy and customizable calendar to create a Calendar. It dispaly the days of a month in a grid layout and allows to navigate between months
Stars: ✭ 113 (+145.65%)
Mutual labels:  calendar-view
Eventscalendar
Events Calendar is a user-friendly library that helps you achieve a cool Calendar UI with events mapping. You can customise every pixel of the calendar as per your wish and still achieve in implementing all the functionalities of the native android calendar in addition with adding dots to the calendar which represents the presence of an event on the respective dates. It can be done easily, you are just a few steps away from implementing your own badass looking Calendar for your very own project!
Stars: ✭ 188 (+308.7%)
Mutual labels:  calendar-view
HorizontalTimesLayout
Layout to display time slots in horizontal 24 hour format
Stars: ✭ 31 (-32.61%)
Mutual labels:  calendar-view
Flutterweekview
Displays a highly customizable week view (or day view) which is able to display events, to be scrolled, to be zoomed-in & out and a lot more !
Stars: ✭ 130 (+182.61%)
Mutual labels:  calendar-view
Kvkcalendar
A most fully customization calendar and timeline library for iOS 📅
Stars: ✭ 160 (+247.83%)
Mutual labels:  calendar-view
Supercalendar
@deprecated android 自定义日历控件 支持左右无限滑动 周月切换 标记日期显示 自定义显示效果跳转到指定日期
Stars: ✭ 2,732 (+5839.13%)
Mutual labels:  calendar-view
Frame
New-tab extension for Chrome and Firefox
Stars: ✭ 89 (+93.48%)
Mutual labels:  calendar-view
kalend
React calendar component with support for multiple views and events
Stars: ✭ 135 (+193.48%)
Mutual labels:  calendar-view
Android Week Calendar
android可自定义日历方案,支持农历、自定义日历控件、排班、左右滑动、周月切换、跳转到指定日期等功能
Stars: ✭ 186 (+304.35%)
Mutual labels:  calendar-view
andColorPicker
Color picker library for Android
Stars: ✭ 233 (+406.52%)
Mutual labels:  android-view
Timetable
📅 Customizable flutter calendar widget including day and week views
Stars: ✭ 140 (+204.35%)
Mutual labels:  calendar-view
Xamarin.plugin.calendar
Calendar plugin for Xamarin.Forms
Stars: ✭ 159 (+245.65%)
Mutual labels:  calendar-view
datepickertimeline
Linear date picker for Jetpack compose
Stars: ✭ 43 (-6.52%)
Mutual labels:  calendar-view
Calendarview
日历 仪表盘 圆盘,提供全新RecyclerView日历,功能更加强大。
Stars: ✭ 125 (+171.74%)
Mutual labels:  calendar-view
MaterialChipView
Material Chip View can be used as tags for categories, contacts or creating text clouds. Port of
Stars: ✭ 13 (-71.74%)
Mutual labels:  android-view
Aircalendarview
Airbnb APP CalendarView
Stars: ✭ 96 (+108.7%)
Mutual labels:  calendar-view
Customizablecalendar
CustomizableCalendar is a library that allows you to create your calendar, customizing UI and behaviour
Stars: ✭ 214 (+365.22%)
Mutual labels:  calendar-view
AndroidTips
A collections of tips in Android developing.Android开发总结。我的博客:
Stars: ✭ 721 (+1467.39%)
Mutual labels:  android-view
react-calendar
A no dependencies, lightweight and feature-rich ⚡ calendar component for react.
Stars: ✭ 68 (+47.83%)
Mutual labels:  calendar-view
QuantityPickerView
A View capable of increasing or decreasing a unit value with a toggle animation
Stars: ✭ 42 (-8.7%)
Mutual labels:  android-view

No longer supported

Unfortunately, I no longer have the time to continue developing this library and my focus has shifted. If you are switching to Flutter, you might be interested in my timetable package as a replacement.

CalendarView

Build Status Bintray

Apache 2.0 license Semver Awesome Badges

This library provides a Material Design CalendarView for Android (week and day view; more coming soon!). The default style is copied from the Google Calendar app, but almost everything is customizable.

Screenshot of the example app Day view Add event by tapping empty space
image image image

Features

  • Week and Day views
  • Scroll and zoom
  • All-day events (and events > 24h) shown at the top
  • All colors and most spacings are customizable

Usage

  1. Add the library to your gradle script
implementation 'com.jonaswanke.calendar:calendar:0.1.1'
  1. Add CalendarView in you layout
<com.jonaswanke.calendar.CalendarView
    android:id="@+id/calendar"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:range="week" />

Currently supported ranges are week and day. More coming soon!

  1. Provide events to the view
calendar.eventRequestCallback = { week ->
    // Retrieve events synchronously or asynchronously
    val events: List<Event> = // ...
    calendar.setEventsForWeek(week, events)
}

CalendarView currently caches two views for either side of the current view (e.g. two weeks to the left and two to the right) for smooth swiping. When a new view is loaded, eventRequestCallback will be called with the new week.
You should then supply events starting in that week by calling calendar.setEventsForWeek() (multi-day and multi-week events are always stored where they begin and will then be distributed to where they are required).

You can call calendar.setEventsForWeek() anytime you want. The events will be cached and used when required. Old events starting in that week are overridden.

Events implement the following properties:

val title: String // Displayed in bold
val description: String? // Optional; shown in a second line
@get:ColorInt
val color: Int? // Optional background color
val start: Long // Start time
val end: Long // End time
val allDay: Boolean // Whether the event takes all day. If so, start and end are just used to determine the day
  1. Add your listeners (optional)
calendar.onEventClickListener = { event ->
    // Event was clicked
    Toast.makeText(this, "${event.title} clicked", Toast.LENGTH_LONG).show()
}
calendar.onEventLongClickListener = { event ->
    // Event was long clicked
    Toast.makeText(this, "${event.title} long clicked", Toast.LENGTH_LONG).show()
}

As shown in screenshot 3 (above), the user can add events by tapping empty space inside CalendarView. This only works when an onAddEventListener is set.

calendar.onAddEventListener = { addEvent ->
    // User tried to create a new event. addEvent is an event with populated start and end.
    Toast.makeText(this, "Add event at ${start}", Toast.LENGTH_SHORT).show()
    // Return true to remove the placeholder
    true
}

Sample

There is also a sample app to get you started.

Customization

Following soon...

Changelog

See here for the changelog.

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].