Code Monkey home page Code Monkey logo

holo-calendar's Introduction

Holo Calendar

A Holo Calendar library for Android. This library is based on This is +Loranz Yousif's design.

Screenshot

This Calendar library makes it simple to add a full Calendar View in your Android application. The library contains a view to show a single month(CalendarView), and multiple months(MultiCalendarView) in a ViewPager.

All you need to use this library is include it in your build, and add a few lines of code:

Layout XML file

<?xml version="1.0" encoding="utf-8"?>
<com.vdesmet.lib.calendar.MultiCalendarView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/multi_calendar"
        android:layout_width="350dp"
        android:layout_height="350dp" />

Activity/Fragment code

// Retrieve the CalendarView
MultiCalendarView multiMonth = (MultiCalendarView) findViewById(R.id.multi_calendar);

// Set the first valid day
final Calendar firstValidDay = Calendar.getInstance();
multiMonth.setFirstValidDay(firstValidDay);

// Set the last valid day
final Calendar lastValidDay = Calendar.getInstance();
lastValidDay.add(Calendar.MONTH, 3);
multiMonth.setLastValidDay(lastValidDay);

The Calendar also allows for customization:

  • A custom Typeface using setTypeFace()
  • A custom first and last day of week. For example, from Monday - Friday
  • By using the DayAdapter it's also possible to:
    • Disable a specific date. FOr example, sundays, holidays
    • Alter a TextView of both the header and Date
    • Add category colors to a specific day. For example: Show a red color for Work stuff, and a green one for holiday events
  • Disable the TitlePageIndicator when using MultiCalendarView

Sample

A sample application is available on Github and available for download on Google Play.

Special Thanks

  • Thanks to Loranz Yousif for designing the Calendar itself. Due to his designs, this library was made.

holo-calendar's People

Contributors

vdesmet93 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.