Cadar


Source link: https://github.com/memfis19/Cadar

Cadar

Android solution which represents month and list calendars views and possibility to display events: just set of events and recurrent as well, but with limitations. For events processing I am using Ical4J library.

Example of most common using:

Add to your layout:
 <io.github.memfis19.cadar.view.MonthCalendar

android:id="@+id/monthCalendar"

android:layout_width="match_parent"

android:layout_height="300dp" /> 
Using in code:
MonthCalendarConfiguration.Builder builder = new MonthCalendarConfiguration.Builder(this);
 monthCalendar.setCalendarPrepareCallback(this);
 monthCalendar.prepareCalendar(builder.build());
  monthCalendar.setOnDayChangeListener(new OnDayChangeListener() {

  @Override
  public void onDayChanged(Calendar calendar) {

Toast.makeText(MonthCalendarActivity.this, calendar.getTime().toString(), Toast.LENGTH_SHORT).show();

 
}

  
}
);
 monthCalendar.setOnMonthChangeListener(new OnMonthChangeListener() {

  @Override
  public void onMonthChanged(Calendar calendar) {

Toast.makeText(MonthCalendarActivity.this, calendar.getTime().toString(), Toast.LENGTH_SHORT).show();

 
}

  
}
);
 ...  @Override public void onCalendarReady(CalendarController calendar) {

 monthCalendar.displayEvents(events, new DisplayEventCallback() {

 @Override

public void onEventsDisplayed() {

 
}
  
}
);
 
}
 
Don't forget to release calendar:
@Override protected void onDestroy() {

 super.onDestroy();

 monthCalendar.releaseCalendar();
 
}
 

For more specific using please look at sample project.

Events processing:

Events processing implemented in most simple way, each event has start date - date of start and end date - date of event end. Please notice that event does not have duration. so there is not exist stop date. Each event next periods for recurrency processting: none, every week, every 2 week, every 3 week, every 4 week, every month, every year. If event does npt have end date and repeat period set to none, that will single event, in case even has any other repeat period without end date, it will be endless event.

Month and list calendars limited in time, by defualt they displayed for 3 years. You are able to extend it via calendar configurations. In case if you want to use list and month calendars coupled, then you need to keep the same configuration settings for them.

One more important thing to know about event processing

In some cases during event processing, periods of calculaction may overlap and in this case events can be duplicated, to avoid this please override equals() and hashCode() methods in your model class which implements Event. For more details please look at sample source code.

How to add to your project?

compile 'io.github.memfis19:cadar:0.4.8' 

Know issues

-Library has not release yet, so it will be extended in future.
-Not full documentation will be fixed soon.

Roadmap

-Add more documentation;
-Extend event's recurring settings;
-Add more tools to customize list calendar UI.

Bugs and Feedback

For bugs, feature requests, and discussion please use GitHub Issues.

LICENSE

MIT License
Copyright (c) 2016 Rodion Surzhenko

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Resources

Failsafe is a lightweight, zero-dependency library for handling failures. It was designed to be as easy to use as possible, with a concise API for handling everyday use cases and the flexibility to handle everything else.

This project is implementation of ideas from Managing state reactive way article.

"vcard-androidParser" is an android library for developers who wish to get ez-vcard working for android devices or simply it can be used to parse vcf or vcard files in android

A tiny library for implementing endless loading list easily in Android applications, similar to those seen in Facebook or Twitter apps.

Type safe bundle/intent building for any class (activities, fragments, ...)

Add badge (version code, version name, etc) for your DEBUG APK.

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