MyDynamicCalendar


Source link: https://github.com/developerVatsal/MyDynamicCalendarExample

MyDynamicCalendarLibrary

This is an Android Library for developer to use customized calendar with all type of views and features, like Month View, Week View, Day View, Agenda, Add Events, Add Holiday etc. So all of these features contain in one calendar.
Example is available in app module.

##Download

###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.vatsaldesai92:MyDynamicCalendarLibrary:1.0.1' 
}
 

##Usage

  • Add MyDynamicRecyclerView in xml file or dynamicaly careate in java file.

 <com.desai.vatsal.mydynamiccalendar.MyDynamicCalendar

android:id="@+id/myCalendar"

android:layout_width="match_parent"

android:layout_height="match_parent" />
 MyDynamicCalendar myCalendar = new MyDynamicCalendar(this);
 
  • Design Calendar View

 myCalendar.setCalendarBackgroundColor("#eeeeee");
 or  myCalendar.setCalendarBackgroundColor(R.color.gray);

  myCalendar.setHeaderBackgroundColor("#454265");

  myCalendar.setHeaderTextColor("#ffffff");

  myCalendar.setNextPreviousIndicatorColor("#245675");

  myCalendar.setWeekDayLayoutBackgroundColor("#965471");

  myCalendar.setWeekDayLayoutTextColor("#246245");

  myCalendar.setExtraDatesOfMonthBackgroundColor("#324568");

  myCalendar.setExtraDatesOfMonthTextColor("#756325");

  myCalendar.setDatesOfMonthBackgroundColor("#145687");

  myCalendar.setDatesOfMonthTextColor("#745632");

  myCalendar.setCurrentDateBackgroundColor(R.color.black);

  myCalendar.setCurrentDateTextColor("#00e600");

  myCalendar.setBelowMonthEventTextColor("#425684");

  myCalendar.setBelowMonthEventDividerColor("#635478");
 
  • Manage Saturday & Sunday

// set all saturday off(Holiday) - default value is false
 // isSaturdayOff(true/false, date_background_color, date_text_color);

 myCalendar.isSaturdayOff(true, "#ffffff", "#ff0000");

  // set all sunday off(Holiday) - default value is false
 // isSundayOff(true/false, date_background_color, date_text_color);

 myCalendar.isSundayOff(true, "#ffffff", "#ff0000");
 
  • Manage Events

 myCalendar.setEventCellBackgroundColor("#852365");

  myCalendar.setEventCellTextColor("#425684");

// Add event  -  addEvent(event_date, event_start_time, event_end_time, event_title)
  myCalendar.addEvent("5-10-2016", "8:00", "8:15", "Today Event 1");

  myCalendar.addEvent("05-10-2016", "8:15", "8:30", "Today Event 2");

  myCalendar.addEvent("05-10-2016", "8:30", "8:45", "Today Event 3");

// Get list of event with detail
  myCalendar.getEventList(new GetEventListListener() {

@Override

public void eventList(ArrayList<EventModel> eventList) {

 
}

  
}
);

// updateEvent(position, event_date, event_start_time, event_end_time, event_title)
  myCalendar.updateEvent(0, "5-10-2016", "8:00", "8:15", "Today Event 111111");

// Delete single event
  myCalendar.deleteEvent(2);

// Delete all events
  myCalendar.deleteAllEvent();
 
  • Manage Holiday

 myCalendar.setHolidayCellBackgroundColor("#654248");

  myCalendar.setHolidayCellTextColor("#d590bb");

// set holiday date clickable true/false
  myCalendar.setHolidayCellClickable(false);

// Add holiday  -  addHoliday(holiday_date)
  myCalendar.addHoliday("2-11-2016");

  myCalendar.addHoliday("13-11-2016");

  myCalendar.addHoliday("8-10-2016");

  myCalendar.addHoliday("10-12-2016");
 
  • Navigate to particular date

 // setCalendarDate(date, month, year)
  myCalendar.setCalendarDate(5, 10, 2016);
 
  • Month View

 // show month view
  myCalendar.showMonthView();

// date click listener
  myCalendar.setOnDateClickListener(new OnDateClickListener() {

@Override

public void onClick(Date date) {

 
}

 @Override

public void onLongClick(Date date) {

 
}

  
}
);
 
  • Month View With Event List (Show event on event date click)

 // show month view with events
  myCalendar.showMonthViewWithBelowEvents();

// date click listener
  myCalendar.setOnDateClickListener(new OnDateClickListener() {

@Override

public void onClick(Date date) {

 
}

 @Override

public void onLongClick(Date date) {

 
}

  
}
);
 
  • Week View

 // show week view
  myCalendar.showWeekView();

// date click listener
  myCalendar.setOnDateClickListener(new OnDateClickListener() {

@Override

public void onClick(Date date) {

 
}

 @Override

public void onLongClick(Date date) {

 
}

  
}
);

// week view blank cell click listener
  myCalendar.setOnWeekDayViewClickListener(new OnWeekDayViewClickListener() {

@Override

public void onClick(String date, String time) {

 
}

 @Override

public void onLongClick(String date, String time) {

 
}

  
}
);

// single event cell click listener
  myCalendar.setOnEventClickListener(new OnEventClickListener() {

@Override

public void onClick() {

 
}

 @Override

public void onLongClick() {

 
}

  
}
);
 
  • Day View

 // show day view
  myCalendar.showDayView();

// day view blank cell click listener
  myCalendar.setOnWeekDayViewClickListener(new OnWeekDayViewClickListener() {

@Override

public void onClick(String date, String time) {

 
}

 @Override

public void onLongClick(String date, String time) {

 
}

  
}
);

// single event cell click listener
  myCalendar.setOnEventClickListener(new OnEventClickListener() {

@Override

public void onClick() {

 
}

 @Override

public void onLongClick() {

 
}

  
}
);
 
  • Agenda View

 // show agenda view
  myCalendar.showAgendaView();

// date click listener
  myCalendar.setOnDateClickListener(new OnDateClickListener() {

@Override

public void onClick(Date date) {

 
}

 @Override

public void onLongClick(Date date) {

 
}

  
}
);
 

##License


 Apache Version 2.0

Copyright 2016.

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. 

Resources

Herald provides a very simple way to initialize logger objects and does all magic for you. You can annotate any field of some class with a @Log annotation to let Herald inject suitable logger in this field. It does not matter whether it is a static field or not.

An extension for ResideMenu.

A simple and useful android library to use custom fonts in android apps without adding fonts into asset/resource folder. Also by using this library developer should not have to worry about Typeface object creation for every new font that he use.

Small Android library to simplify common used patterns in view inflation. Using AutoInflateLayout header and footer can be added to ListView.

Cheerleader is an Android open source library designed to easily support an artist in an Android application thanks to a SoundCloud account.

IntentBuilder is a type safe way of creating intents and populating them with extras. Intents were created to be very dynamic but often times the dynamic nature of intents is not needed and just gets in the way of writing safe code.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes