Material Calendar View


Source link: https://github.com/SAMSistemas/MaterialCalendarView

> Prettier and simpler Material Design CalendarView

MaterialCalendarView is a prettier and simpler, material design calendar that allows full customization and it's backwards compatible with API 11+.

Screenshots

Installation

Gradle

  • Add it in your root build.gradle at the end of repositories:
repositories {
  maven {

 url "https://jitpack.io"  
}
 
}
  • Add the dependency:
dependencies {

  compile 'com.github.BlackBoxVision:material-calendar-view:v1.5.5' 
}

Maven

  • Add the JitPack repository to your maven file.
<repository>

<id>jitpack.io</id>

<url>https://jitpack.io</url> </repository>
  • Add the dependency in the form
<dependency>
  <groupId>com.github.BlackBoxVision</groupId>
  <artifactId>material-calendar-view</artifactId>
  <version>v1.5.5</version> </dependency>

SBT

  • Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
  • Add the dependency in the form:
libraryDependencies += "com.github.BlackBoxVision" % "material-calendar-view" % "v1.5.5" 

Usage example

In your layout.xml file:

<io.blackbox_vision.materialcalendarview.view.CalendarView  android:id="@+id/calendar_view"  android:layout_width="match_parent"  android:layout_height="wrap_content"  android:background="@color/colorPrimary"> </io.blackbox_vision.materialcalendarview.view.CalendarView>

This example shows all the possible customization around Material Calendar View:

<io.blackbox_vision.materialcalendarview.view.CalendarView  android:id="@+id/calendar_view"  android:layout_width="match_parent"  android:layout_height="match_parent"  app:calendarIsMultiSelectDayEnabled="false"  app:calendarIsOverflowDatesVisible="true"  app:calendarBackgroundColor="@color/colorPrimary"  app:calendarTitleTextColor="@color/colorAccent"  app:calendarCurrentDayTextColor="@color/white"  app:calendarDayOfWeekTextColor="@android:color/white"  app:calendarDisabledDayBackgroundColor="@color/colorPrimary"  app:calendarDisabledDayTextColor="@android:color/darker_gray"  app:calendarSelectedDayBackgroundColor="@color/colorAccent"  app:calendarTitleBackgroundColor="@color/colorPrimary"  app:calendarWeekBackgroundColor="@color/colorPrimary"  app:calendarCurrentDayBackgroundColor="@color/teal500"  app:calendarWeekendTextColor="@color/colorAccent"  app:calendarButtonBackgroundColor="@color/colorAccent"  app:calendarWeekendDays="saturday|sunday"> </io.blackbox_vision.materialcalendarview.view.CalendarView>

Then, in your Activity.java or Fragment.java initialize the calendar:

calendarView = (CalendarView) findViewById(R.id.calendar_view);
  calendarView.shouldAnimateOnEnter(true)  .setFirstDayOfWeek(Calendar.MONDAY)
.setOnDateClickListener(this::onDateClick)  .setOnMonthChangeListener(this::onMonthChange)  .setOnDateLongClickListener(this::onDateLongClick)  .setOnMonthTitleClickListener(this::onMonthTitleClick);
  if (calendarView.isMultiSelectDayEnabled()) {
  calendarView.setOnMultipleDaySelectedListener(this::onMultipleDaySelected);
 
}
  calendarView.update(Calendar.getInstance(Locale.getDefault()));

Issues

If you found a bug, or you have an answer, or whatever. Please, open an issue. I will do the best to fix it, or help you.

Contributing

Of course, if you see something that you want to upgrade from this library, or a bug that needs to be solved, PRs are welcome!

Backers

Support us with a monthly donation and help us continue our activities. [ Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [ Become a sponsor]

License

Distributed under the MIT license. See LICENSE for more information.

Resources

With MaterialTimelineView you can easily create a material looking timeline. Library written in Kotlin.

Instagram like dot indicator standalone view. It can be used with any component.

Endpoint2mock2 is a library for mocking Retrofit 2 Http endpoint in your Android app. It works just by adding @MockedEndpoint annotation to the Retrofit calls.

A bar chart is a chart or graph that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. The bars can be plotted vertically or horizontally.

This is a library which allows you to create a record button view in android.

Custom slider for Android build from scratch.

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