Home Android Material CalenderView

Android Material CalenderView

Android Material CalenderView

Language :
Platform :
Type :
Main Category :
Sub Category :
License :
Price :

Material Calendar View Build Status Android Arsenal Join the chat at https://gitter.im/jonisaa/material-calendar-view

Material Calendar View is a Library based on the GitHub project: Custom Calendar View

I found Custom Calendar View as a really interesting project. But when I started using Custom Calendar View I’ve found that it needed some modifications in order to work as I expected.

So I decided to get involved onto Custom Calendar View to get the modifications I needed. (Thanks to Npanigrahy)

Nowadays my project supports this features:

  • Compatibility with Android API 8+
  • Swipe gesture-based navigation
  • 'Next' and 'Previous' month-based navigation
  • Full customization of calendar from XML file, or setters.
  • User-allowed to handle events when changes month and day selection using two listeners.
  • Show/hide next/previous month overflow days.
  • User-allowed modify Typeface of the Calendar View by using setTypeface() method.
  • Unlimited customizations for Day of the Month using custom Decorators.
  • Add Roboto Fonts files and a Util class to make this fonts accessible. (This probably increase library size)

Features in Process

In order to make the Calendar more customizable and Interactive, the next is a list of some features that I want to add:

  • Provide two CalendarViews, one build in Java Calendar API, and the other in JODA Time API
  • Synchonize Events with Google Calendar ContentProvider
  • Add Ripple Effects when the user touches a day.
  • Add two layouts for CalendarView: first one that supports only Swipe navigation without buttons; the second one will support Swipe, and back/next button navigation (actually the default view).

6th November 2015

Announcing the draft of a new release v1.2.2.The changes applied are the next:

  • BugFix of issue1, now CalendarView should not break activity when displaying for Chinese Locale. Speccially thanks to @maddie who solve submiting a pull request

4th November 2015

Announcing the draft of a new release v1.2.1. The changes applied are the next:

  • Deleted unused resources to reduce library file size.
  • Added RobotoFonts to the Assets folder.
  • Added a String file handling all path to RobotoFonts.
  • Added a Util class to get the Roboto typefaces called TypefaceUtil.
  • Better performance on Swipe by making some adjustments.
  • Added setBackButtonColor method, it allows you to change back arrow color.
  • Added setNextButtonColor method, it allows you to change next arrow color
  • Added setBackButtonDrawable method, it allows you to change back button drawable.
  • Added setNextButtonDrawable method, it allows you to change next button drawable.
  • Modified the month title show format from "MONTH_NAME" to "MONTH_NAME + ' ' + YEAR"
  • BugFix: Retain current day style even if you swipe to another month and come back to actual month.
  • Added method findViewByDate(), it receives a Date as param and returns a DayView object (Custom TextView). It lets you style dayView as you want.
  • Refactor of some methods in order to clarify code readability.
  • markCurrentDay is now renamed to setCurrentDay().
  • markCurrentDateAsSelected is now renamed to setDateAsSelected().



Adding to your Project

Nowadays the library current stable version is 1.2.2.

For Gradle:

Step 1: you must add the JitPack repository to your build file. Type the on your build.gradle at the end of repositories.

  repositories {
    maven { 
        url "https://jitpack.io"

Step 2: Add the dependency in the form

dependencies {
    compile 'com.github.BlackBoxVision:material-calendar-view:v1.2.3'

For Maven:

Step 1: Add the JitPack repository to your maven file.


Step 2: Add the dependency in the form


For SBT:

Step 1: Add it in your build.sbt at the end of resolvers:

resolvers += "jitpack" at "https://jitpack.io"

Step 2: Add the dependency in the form

libraryDependencies += "com.github.BlackBoxVision" % "material-calendar-view" % "v1.2.3"    

Using Material Calendar View library

This project includes a Sample App that shows you the true power of this library. If you want to know more, feel free to clone, deploy and play with it. Else I’ll give you a little code snippets.

Pay attention to the following:


The above code snippet will show the simple Calendar View on the default layout. Now, you can use the following attributes if you want to customize the appearance of calendar:


The next step is initialize the Calendar View to change the appearance and behavior of calendar using the following methods:

calendarView = (CalendarView) findViewById(R.id.calendar_view);

calendarView.setCurrentDay(new Date(System.currentTimeMillis()));
calendarView.setOnDateSelectedListener(new CalendarView.OnDateSelectedListener() {
    public void onDateClick(@NonNull Date selectedDate) {
        SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy", Locale.getDefault());

calendarView.setOnMonthChangedListener(new CalendarView.OnMonthChangedListener() {
    public void onMonthChanged(@NonNull Date monthDate) {
        SimpleDateFormat df = new SimpleDateFormat("dd MMMM yyyy", Locale.getDefault());
        if (null != actionBar)

final DayView dayView = calendarView.findViewByDate(new Date(System.currentTimeMillis()));
if(null != dayView)
    Toast.makeText(getApplicationContext(), "Today is: " + dayView.getText().toString() + "/" + calendarView.getCurrentMonth() + "/" +  calendarView.getCurrentYear(), Toast.LENGTH_SHORT).show();

Known issues

I’ve made a lot of testand I’ve found no issues. This library I’ve built againts travis and run the sample app in the supported API emulators. But maybe you can find an Issue that i can't detect or whatever.

If you do so, please, let me know. I will be happy to solve it in order to help you.

Specially Thanks

Thanks to Mai Arrojo, who colaborate by my side to make English README file more understandable. We are working actually in the library code documentantion. She is good with translations. If you want to contact her for a job opportunity mail her to: [email protected]

Contact Me

If you like this library, and want me to add some features in order to make it better just mail me to [email protected] or [email protected] I’ll make it count.


This library is distributed under Apache License 2, feel free to do any modification.

 * Copyright (C) 2015 ImanoWeb     {link: http://imanoweb.com}.
 * Copyright (C) 2015 SAMSistemas  {link: http://www.samsistemas.com.ar}
 * Copyright (C) 2015 Jonisaa      {link: http://the-android-developer.blogspot.com.ar}.
 * 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,
 * See the License for the specific language governing permissions and
 * limitations under the License.


Leave a Comment