All Projects → alamkanak → Android Week View

alamkanak / Android Week View

Licence: apache-2.0
Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Week View

Crunchycalendar
A beautiful material calendar with endless scroll, range selection and a lot more!
Stars: ✭ 465 (-86.11%)
Mutual labels:  custom-view, calendar, calendar-view
Cvcalendar
A custom visual calendar for iOS 8+ written in Swift (>= 4.0).
Stars: ✭ 3,435 (+2.63%)
Mutual labels:  custom-view, calendar, calendar-view
Peppy Calendarview
Simple and fast Material Design calendar view for Android.
Stars: ✭ 30 (-99.1%)
Mutual labels:  custom-view, calendar, calendar-view
Material Calendar View
📅 Material Design Calendar compatible with API 11+
Stars: ✭ 360 (-89.24%)
Mutual labels:  custom-view, calendar, calendar-view
Xamarin.plugin.calendar
Calendar plugin for Xamarin.Forms
Stars: ✭ 159 (-95.25%)
Mutual labels:  calendar, calendar-view
Calendar Ios
Calendar View
Stars: ✭ 154 (-95.4%)
Mutual labels:  calendar, calendar-view
Android Week Calendar
android可自定义日历方案,支持农历、自定义日历控件、排班、左右滑动、周月切换、跳转到指定日期等功能
Stars: ✭ 186 (-94.44%)
Mutual labels:  calendar, 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 (-94.38%)
Mutual labels:  calendar, calendar-view
Customizablecalendar
CustomizableCalendar is a library that allows you to create your calendar, customizing UI and behaviour
Stars: ✭ 214 (-93.61%)
Mutual labels:  calendar, calendar-view
Supercalendar
@deprecated android 自定义日历控件 支持左右无限滑动 周月切换 标记日期显示 自定义显示效果跳转到指定日期
Stars: ✭ 2,732 (-18.37%)
Mutual labels:  calendar, calendar-view
GCCalendar
A customizable calendar view for iOS 9+ written in Swift.
Stars: ✭ 53 (-98.42%)
Mutual labels:  calendar, calendar-view
Timetable
📅 Customizable flutter calendar widget including day and week views
Stars: ✭ 140 (-95.82%)
Mutual labels:  calendar, 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 (-96.12%)
Mutual labels:  calendar, calendar-view
Kvkcalendar
A most fully customization calendar and timeline library for iOS 📅
Stars: ✭ 160 (-95.22%)
Mutual labels:  calendar, calendar-view
Aircalendarview
Airbnb APP CalendarView
Stars: ✭ 96 (-97.13%)
Mutual labels:  calendar, calendar-view
Swift Week View
An iOS calendar library for displaying calendar events in a week view.
Stars: ✭ 88 (-97.37%)
Mutual labels:  calendar, calendar-view
Kotlin Agendacalendarview
Android calendar library provides easy to use widget with events
Stars: ✭ 81 (-97.58%)
Mutual labels:  calendar, calendar-view
Recyclercalendarandroid
A simple DIY library to generate your own custom Calendar View using RecyclerView, written in Kotlin
Stars: ✭ 83 (-97.52%)
Mutual labels:  calendar, calendar-view
Primedatepicker
PrimeDatePicker is a tool that provides picking a single day, multiple days, and a range of days.
Stars: ✭ 292 (-91.28%)
Mutual labels:  calendar, calendar-view
CalendarView
日历控件
Stars: ✭ 14 (-99.58%)
Mutual labels:  calendar, calendar-view

Android Week View

Gitter chat

Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.

Features

  • Week view calendar
  • Day view calendar
  • Custom styling
  • Horizontal and vertical scrolling
  • Infinite horizontal scrolling
  • Live preview of custom styling in xml preview window

Who uses it

Usage

  1. Import the library into your project.
  • Grab via maven

    <dependency>
      <groupId>com.github.alamkanak</groupId>
      <artifactId>android-week-view</artifactId>
      <version>1.2.6</version>
      <type>aar</type>
    </dependency>
  • Grab via gradle

    compile 'com.github.alamkanak:android-week-view:1.2.6'
  1. Add WeekView in your xml layout.

    <com.alamkanak.weekview.WeekView
            android:id="@+id/weekView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:eventTextColor="@android:color/white"
            app:textSize="12sp"
            app:hourHeight="60dp"
            app:headerColumnPadding="8dp"
            app:headerColumnTextColor="#8f000000"
            app:headerRowPadding="12dp"
            app:columnGap="8dp"
            app:noOfVisibleDays="3"
            app:headerRowBackgroundColor="#ffefefef"
            app:dayBackgroundColor="#05000000"
            app:todayBackgroundColor="#1848adff"
            app:headerColumnBackground="#ffffffff"/>
  2. Write the following code in your java file.

    // Get a reference for the week view in the layout.
    mWeekView = (WeekView) findViewById(R.id.weekView);
    
    // Set an action when any event is clicked.
    mWeekView.setOnEventClickListener(mEventClickListener);
    
    // The week view has infinite scrolling horizontally. We have to provide the events of a
    // month every time the month changes on the week view.
    mWeekView.setMonthChangeListener(mMonthChangeListener);
    
    // Set long press listener for events.
    mWeekView.setEventLongPressListener(mEventLongPressListener);
  3. Implement WeekView.MonthChangeListener, WeekView.EventClickListener, WeekView.EventLongPressListener according to your need.

  4. Provide the events for the WeekView in WeekView.MonthChangeListener.onMonthChange() callback. Please remember that the calendar pre-loads events of three consecutive months to enable lag-free scrolling.

    MonthLoader.MonthChangeListener mMonthChangeListener = new MonthLoader.MonthChangeListener() {
        @Override
        public List<WeekViewEvent> onMonthChange(int newYear, int newMonth) {
            // Populate the week view with some events.
            List<WeekViewEvent> events = getEvents(newYear, newMonth);
            return events;
        }
    };

Customization

You can customize the look of the WeekView in xml. Use the following attributes in xml. All these attributes also have getters and setters to enable you to change the style dynamically.

  • allDayEventHeight
  • columnGap
  • dayBackgroundColor
  • dayNameLength
  • eventMarginVertical
  • eventPadding
  • eventTextColor
  • eventTextSize
  • firstDayOfWeek
  • headerColumnBackground
  • headerColumnPadding
  • headerColumnTextColor
  • headerRowBackgroundColor
  • headerRowPadding
  • hourHeight
  • hourSeparatorColor
  • hourSeparatorHeight
  • noOfVisibleDays
  • overlappingEventGap
  • textSize
  • todayBackgroundColor
  • todayHeaderTextColor
  • showDistinctPastFutureColor
  • futureBackgroundColor
  • pastBackgroundColor
  • showDistinctWeekendColor
  • futureWeekendBackgroundColor
  • pastWeekendBackgroundColor
  • showNowLine
  • nowLineColor
  • nowLineThickness
  • scrollDuration

Interfaces

Use the following interfaces according to your need.

  • mWeekView.setWeekViewLoader() to provide events to the calendar
  • mWeekView.setMonthChangeListener() to provide events to the calendar by months
  • mWeekView.setOnEventClickListener() to get a callback when an event is clicked
  • mWeekView.setEventLongPressListener() to get a callback when an event is long pressed
  • mWeekView.setEmptyViewClickListener() to get a callback when any empty space is clicked
  • mWeekView.setEmptyViewLongPressListener() to get a callback when any empty space is long pressed
  • mWeekView.setDateTimeInterpreter() to set your own labels for the calendar header row and header column
  • mWeekView.setScrollListener() to get an event every time the first visible day has changed

Sample

There is also a sample app to get you started.

To do

  • Add event touch feedback selector
  • Show events that expand multiple days properly

Changelog

Version 1.2.6

  • Add empty view click listener
  • Fix padding bug
  • Fix bug when setting colors of different components
  • Add ability to turn off fling gesture
  • Add example of how to load events asynchronously in the sample app

Version 1.2.5

  • Add support for using subclasses of WeekViewEvent
  • Fix scroll animation
  • Add support for semi-transparent header colors

Version 1.2.4

  • NOTE: If you are using WeekView.MonthChangeListener, make sure to change it into MonthLoader.MonthChangeListener
  • Add support to have loaders other than MonthViewLoader
  • Add pinch to zoom support
  • Add support for location
  • Add ability to have different colors for past, future, weekend days
  • Add support for "now" line

Version 1.2.3

  • Get callbacks when scrolling horizontally
  • goToHour and goToDate methods has been fixed
  • Use getFirstVisibleHour method to get the first visible hour in the week view

Version 1.2.1

  • Better scrolling added
  • Get callbacks when empty view is tapped/long pressed
  • Control the speed of scrolling
  • Support for multiple language added
  • Ability to set your own interpreter for header row and column added

Version 1.1.7

  • You can now dynamically scroll to an hour of your preference.

Version 1.1.6

  • Added support for events that expands to multiple days

Version 1.1.5

  • A bug related to overlapping events fixed
  • You can now programmatically get first and last visible day in the week view

Version 1.1.4

  • Small bug fixed

Version 1.1.3

  • Margins support added for overlapping events

Version 1.1.2

  • Small bugs fixed
  • Hour separator inconsistency fixed

Version 1.1.1

  • Overlapping event bug fixed

Version 1.1.0

  • Added support for overlapping events

License

Copyright 2014 Raquib-ul-Alam

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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].