Customizable android calendar view
Supports from Android SDK version 14 and above.
An easy to implement and use calendar view with customizations and locales.
Gradle dependency:
Add the following to your project level build.gradle:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add this to your app build.gradle:
dependencies {
compile 'com.github.vikramezhil:DroidCalendarView:v1.0.2'
}
Maven:
Add the following to the section of your pom.xml:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add the following to the section of your pom.xml:
<dependency>
<groupId>com.github.vikramezhil</groupId>
<artifactId>DroidCalendarView</artifactId>
<version>v1.0.2</version>
</dependency>
For a detailed documentation 📔, please have a look at the Wiki.
In your layout file add Droid Calendar View,
<com.vikramezhil.droidcalendarview.DCView
android:id="@+id/dcView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
In your class file, initialize Droid Calendar View using the ID specified in your layout file
DCView dcView = findViewById(R.id.dcView);
Set droid calendar data
// Setting the droid calendar data with preferred start and end range
dcView.setDCData("January 2017", "December 2017", "MMMM YYYY", "MMMM YYYY", "d", Locale.US);
Set and implement the droid calendar listener methods
// Setting the droid calendar listener
dcView.setOnDCListener(this);
// Implementing the droid calendar listener methods
@Override
void onDCScreenData(int calendarPosition, List<String> calendarDatesWithPresent, List<String> calendarDatesWithPastPresentFuture)
{
// Triggered whenever the on screen data changes in droid calendar
}
@Override
void onDCDateClicked(String date)
{
// Triggered when a date is clicked in droid calendar
}
Copyright 2017 Vikram Ezhil
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.