CalendarListview


Source link: https://github.com/traex/CalendarListview

CalendarListview

CalendarListview provides a easy way to select dates with a calendar for API 10+. You can find a sample that show how to add DatePickerView to your layout without customization.

Integration

The lib is available on Maven Central, you can find it with Gradle, please

dependencies {

  compile 'com.github.traex.calendarlistview:library:1.2.3' 
}
 

Usage

Declare a DayPickerView inside your layout XML file:

  <com.andexert.calendarlistview.library.DayPickerView

 android:id="@+id/pickerView"

 xmlns:calendar="http://schemas.android.com/apk/res-auto"

 android:layout_width="match_parent"

 android:layout_height="match_parent"/>

 

Next, you have to implement DatePickerController in your Activity or your Fragment. You will have to set getMaxYear and onDayOfMonthSelected. The first one is the max year between the current one and this maxYear. The second one is called every time user selects a new date.

 @Override
  public int getMaxYear()
  {

return 2015;
  
}

 @Override
  public void onDayOfMonthSelected(int year, int month, int day)
  {

Log.e("Day Selected", day + " / " + month + " / " + year);

  
}

  

Customization

CalendarListview is fully customizable:

  • app:colorCurrentDay [color def:#ff999999] --> The current day is always in bold but you can change its color
  • app:colorSelectedDayBackground [color def:#E75F49] --> If you click on a day, a circle indicator or a rouded rectangle indicator will be draw.
  • app:colorSelectedDayText [color def:#fff2f2f2] --> This is the text color of a selected day
  • app:colorPreviousDay [color def:#ff999999] --> In the current month you can choose to have a specific color for the past days
  • app:colorNormalDay [color def:#ff999999] --> Default text color for a day
  • app:colorMonthName [color def:#ff999999] --> Month name and year text color
  • app:colorDayName [color def:#ff999999] --> Day name text color
  • app:textSizeDay [dimension def:16sp] --> Font size for numeric day
  • app:textSizeMonth [dimension def:16sp] --> Font size for month name
  • app:textSizeDayName [dimension def:10sp] --> Font size for day name
  • app:headerMonthHeight [dimension def:50dip] --> Height of month name
  • app:drawRoundRect [boolean def:false] --> Draw a rounded rectangle for selected days instead of a circle
  • app:selectedDayRadius [dimension def:16dip] --> Set radius if you use default circle indicator
  • app:calendarHeight [dimension def:270dip] --> Height of each month/row
  • app:enablePreviousDay [boolean def:true] --> Enable past days in current month
  • app:currentDaySelected [boolean def:false] --> Select current day by default
  • app:firstMonth [enum def:-1] --> Start listview at the specified month
  • app:lastMonth [enum def:-1] --> End listview at the specified month

Contact

You can reach me at +RobinChutaux or for technical support feel free to open an issue here :)

Acknowledgements

Thanks to Flavien Laurent for his DateTimePicker.

MIT License


 The MIT License (MIT)

 Copyright (c) 2014 Robin Chutaux

 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

A simple layout working as a switch on-off button.

The Universal Event Bus is an event dispatcher architecture which help you to use most common event bus implementation as Otto in a structured mode.

An events is a bus designed to separate different parts of the application, while still allowing them to communicate efficiently. The operation of the EventDispatcher is based on the publish-subscribe pattern: the bus asked a series of events that will be collected by those who joined them.

The publisher is, in this case, called Bus or RxBus and deals with post events using the Observable of RxJava. The event dispatcher contains two RxBuses: one dedicated to the UI thread, and the other for all the other events that have nothing to do with the UI (network calls, CRUD operations with the database etc.).

Change/add font of Entire Android Application at time with out wasting your time - TextViews, EditText, Buttons, Views, etc.

Small library that contains common extensions for Android. Aims:

  • Provide the shortest way to do things
  • Reduce count of "Compat" and "Utils" classes
  • Remove boilerplate code

A very small library to implement a connection indicator view. These connections may be GPS, Network or other loading indicators.

JFixture is an open source library based on the popular .NET library, AutoFixture.

JFixture is a Java library to assist in the writing of Unit Tests, particularly when following Test Driven Development. It generates types based on the concept of 'constrained non-determinism', which is an implementation of the Generated Value xUnit test pattern.

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