clean-simple-calendar


Source link: https://github.com/dpreussler/clean-simple-calendar

clean-simple-calendar

Small simple android calendar implementation

Time-Square is the ultimate calendar but a but hard to customize The alternative Caldroid is based on really unclean code, hard to change, hard to test. Also it is used custom selection logic instead of using selection and disabled states of the views.

This one is

  • a simple view, not a fragment
  • item layout xml provided by developer, not included
  • supports i8n by different starting days of week
  • support selection (style via xml selected state)
  • shows last/first days of surrounding months where needed (row count configurable, style via xml disabled-state)
  • marks today
  • supports adding custom view holder and adapters but not needed (see styled_sample)
  • no multiselect
  • no right-to-left (in progress)

It is just the month widget, no navigation or similar.

testCompile 'de.jodamob.android:clean-simple-calendar:1.0'  

Quick start:

Add the 'CalendarWidget' to your layout. Call

calendarWidget.set(  new CalendarBuilder(R.layout.calendar_item_layout, R.layout.calendar_header_layout));

or set more implicit the shown month:

calendarWidget.set( CalendarDataFactory.getInstance(Locale.getDefault()).create(date, ROWS),  new CalendarBuilder(R.layout.calendar_item_layout, R.layout.calendar_header_layout));

where date is a date for the month to show and ROWS an int naming the number of rows to be shown (6 is default, 4 should be minimum)

done.

The layouts must have the following items:

the header layout (day names) must contain one textView with id 'R.id.day' (see the 'ids.xml') the content (day numbers) must contain: a 'TextView' with id 'R.id.date_text' and any kind of 'View' with id 'R.id.custom_cell' that will be used to set selected state (and disabled state for start/end of non-current month date)

example:

<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
  xmlns:tools="http://schemas.android.com/tools"
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@id/custom_cell"
  android:selectable="true"
  android:background="@drawable/custom_calendar_bg_selector"  android:layout_width="match_parent"
  android:layout_height="match_parent">

<TextView

android:id="@id/date_text"

android:duplicateParentState="true"
android:layout_width="wrap_parent"

android:layout_height="wrap_parent"/> </RelativeLayout>

Screenshot from simple_sample (US Locale)

Screenshot from simple_sample (GERMAN Locale)

Screenshot from styled_sample with custom fields and selection

Screenshot from simple_sample (Hebrew language)

Licensed under MIT license (c) 2015 Danny Preussler

Resources

Android library to provide chooser for files in external storage.

Publish multiple modules of a project, be it an android library, one containing NDK, a pure java one or even an annotation processor. Whatever you want to publish in Bintray, do it in a mega easy and customizable way.

This plugin also supports dependencies resolution between local modules (since the POM cant contain local references for logical reasons) in a fully transparent way.

This simple library is just a wrap on newly updated Location APIs.

This Library automatically search for permission in android manifest file and request for the same.

Also, if request is cancelled it shows a popup window with alert to grant permission. If the app can no longer request permission due to "Don't ask again" on permission it will toast a message to grant permission from settings.

All the action performed after grant or deny can be customized by overriding method shown below. Custom permission can be checked instead of all permission in android manifest file.

PrivacyStreams is an Android library for easy and privacy-friendly personal data access and processing. It offers a functional programming model for various types of personal data, including locations, photos, audios, sensors, contacts, messages, and more.

A simple library that provides utilities to use Firebase SDK in a reactive fashion.

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