Description
To use the CustomCalendarView in your application, you first need to add the library to your application. You can do this by either from Gradle, Maven or by directly downloading the source code form GitHub.
If you enjoy this library, don’t forget to follow me on Twitter @npanigrahy or visit my blog.
Custom-Calendar-View alternatives and similar packages
Based on the "UI Widget" category.
Alternatively, view Custom-Calendar-View alternatives based on common mentions on social networks and blogs.
-
EffectiveAndroidUI
Sample project created to show some of the best Android practices to work in the Android UI Layer. The UI layer of this project has been implemented using MVP or MVVM (without binding engine) to show how this patterns works. This project is used during the talk "EffectiveAndroidUI". -
ShowcaseView
Highlight the best bits of your app to users quickly, simply, and cool...ly -
GreenDroid
GreenDroid is a development library for the Android platform. It makes UI developments easier and consistent through your applications. -
SuperTextView
Hi,Developer,Welcome to use SuperTextView ! -
FancyToast-Android
Make your native android Toasts Fancy. A library that takes the standard Android toast to the next level with a variety of styling options. Style your toast from code. -
Smiley Rating
SmileyRating is a simple rating bar for android. It displays animated smileys as rating icon. -
ParallaxEverywhere
Parallax everywhere is a library with alternative android widgets with parallax effects. -
SnapTabLayout
Android library for fluid tablayout animation as seen on Snapchat. -
MotionViews-Android
Code Guide: How to create Snapchat-like image stickers and text stickers. -
FancyAlertDialog-Android
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code. -
Android Draw
A drawing view for your android application. -
ProSwipeButton
A swipe button for Android with a circular progress bar for async operations -
MaterialBanner
A library that provides an implementation of the banner widget from the Material design. -
Android SegmentedControl + multi row support
Android SegmentedControl + multi row support -
ChatBar for Android
[Moved to: https://github.com/cenkgun/ChatBar] -
Aesthetic GraphView
This is a custom graph library where you can customize the graph as you want. The key features are you can take the full control over drawing the path, change the gradient color (Start Color - End Color), Change the circle color, Change the circle radius, Change the path color, Change the line thickness, On/Off Gridlines, Change the grid line color, On/Off Graduations, Change the graduation text color, Draw graph with different starting point, Draw graph from the left border (X0 - coordinate), Draw graph with exact coordinates given, Draw graph from left border and stretch until the end of the screen and it is Supported on OS - JellyBean 4.1 and above -
PageStepIndicator
Step indicator with titles/labels and tons of customizations. -
GIFView
GIFView is a library for showing GIFs in applications -
FingerSignView
A simple library to let you sign (or draw lines) smoothly with your finger into a view and save it. -
CircleControlView
Android implementation of customizable circle control view -
ItemSettingView
Customizable Item Setting View Android -
BrushView
Simple View to change Brush Size, Alpha and Color -
Horizontal Calendar View
A simple library to display a horizontal calendar with custom start and end date, and mark events with a background -
AnimatedTabLayout
A nice Animated TabLayout for Android -
BubbleImageView
A custom ImageView for android that adds a little "arrow" on a extremity
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Custom-Calendar-View or a related project?
README
Custom-Calendar-View
To use the CustomCalendarView in your application, you first need to add the library to your application. You can do this by either from Gradle, Maven or by directly downloading the source code form GitHub.
If you enjoy this library, don’t forget to follow me on Twitter @npanigrahy or visit my blog.
Features
Currently it supports the following features:
- Next and previous month navigation
- Allow various customization including background color for day, week and title
- Set custom typeface using setCustomTypeFace() method.
- Show hide next previous month overflow days
- Set custom day options for start day of week. By default it is set to Calendar.SUNDAY
- Unlimited customizations for day of the month using custom Decorators.
- Allow you to handle event when user changes month and day selection.
Gradle
Step 1 Add the JitPack repository to your build file. Add it in 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.npanigrahy:Custom-Calendar-View:v1.0'
}
Maven
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
Step 2 Add the dependency in the form
<dependency>
<groupId>com.github.npanigrahy</groupId>
<artifactId>Custom-Calendar-View</artifactId>
<version>v1.0</version>
</dependency>
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.npanigrahy" % "Custom-Calendar-View" % "v1.0"
Using CustomCalendarView Library
The GitHub project source includes a sample application, that is used for demonstrating the various features currently supported by this library. Once the library is added to your project, you can include the CustomCalendarView into your activity/fragment layout using the following code snippets.
<com.stacktips.view.CustomCalendarView
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff">
</com.stacktips.view.CustomCalendarView>
The above code snippet will show the simple Calendar View with default design. Now, you can use the following attributes, to customize the appearance of calendar.
<com.stacktips.view.CustomCalendarView
android:id="@+id/calendar_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/off_white"
app:calendarBackgroundColor="@color/off_white"
app:calendarTitleTextColor="@color/black"
app:currentDayOfMonthColor="@color/blue"
app:dayOfMonthTextColor="@color/black"
app:dayOfWeekTextColor="@color/black"
app:disabledDayBackgroundColor="@color/off_white"
app:disabledDayTextColor="@color/grey"
app:selectedDayBackgroundColor="@color/blue"
app:titleLayoutBackgroundColor="@color/white"
app:weekLayoutBackgroundColor="@color/white">
</com.stacktips.view.CustomCalendarView>
Let us now, initialize the calendar view to control the various other appearance and behavior of calendar using the following methods.
//Initialize CustomCalendarView from layout
calendarView = (CustomCalendarView) findViewById(R.id.calendar_view);
//Initialize calendar with date
Calendar currentCalendar = Calendar.getInstance(Locale.getDefault());
//Show Monday as first date of week
calendarView.setFirstDayOfWeek(Calendar.MONDAY);
//Show/hide overflow days of a month
calendarView.setShowOverflowDate(false);
//call refreshCalendar to update calendar the view
calendarView.refreshCalendar(currentCalendar);
//Handling custom calendar events
calendarView.setCalendarListener(new CalendarListener() {
@Override
public void onDateSelected(Date date) {
SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
Toast.makeText(MainActivity.this, df.format(date), Toast.LENGTH_SHORT).show();
}
@Override
public void onMonthChanged(Date date) {
SimpleDateFormat df = new SimpleDateFormat("MM-yyyy");
Toast.makeText(MainActivity.this, df.format(date), Toast.LENGTH_SHORT).show();
}
});
Using Custom TypeFace
//Setting custom font
final Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/Arch_Rival_Bold.ttf");
if (null != typeface) {
calendarView.setCustomTypeface(typeface);
calendarView.refreshCalendar(currentCalendar);
}
Custom Calendar View Library in Android Custom Font
Using Day Decorators
//adding calendar day decorators
List decorators = new ArrayList<>();
decorators.add(new ColorDecorator());
calendarView.setDecorators(decorators);
calendarView.refreshCalendar(currentCalendar);
Custom Calendar View Library in Android Decorator
License
/*
* Copyright (C) 2015 Stacktips {link: http://stacktips.com}.
*
* 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 all licence references and agreements mentioned in the Custom-Calendar-View README section above
are relevant to that project's source code only.