GithubHelp home page GithubHelp logo

blueflychief / material-calendarview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prolificinteractive/material-calendarview

0.0 2.0 0.0 3.92 MB

A Material design back port of Android's CalendarView

Home Page: https://prolificinteractive.github.io/material-calendarview/

License: Apache License 2.0

Java 100.00%

material-calendarview's Introduction

Material Calendar View Android Arsenal

A Material design back port of Android's CalendarView. The goal is to have a Material look and feel, rather than 100% parity with the platform's implementation.

Demo Screen Capture

Usage

  1. Add compile 'com.prolificinteractive:material-calendarview:1.2.0' to your dependencies.
  2. Add MaterialCalendarView into your layouts or view hierarchy.
  3. Set a OnDateSelectedListener or call MaterialCalendarView.getSelectedDates() when you need it.

Javadoc Available Here

Example:

<com.prolificinteractive.materialcalendarview.MaterialCalendarView
    android:id="@+id/calendarView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    app:mcv_showOtherDates="all"
    app:mcv_selectionColor="#00F"
    />

Major Change in 1.2.0

You can now collapse the calendar view to single week paging by calling setCalendarDisplayMode(CalendarMode.WEEKS). By default it is set to CalendarMode.MONTHS. Thanks Dominik Zarzecki!

Major Change in 1.0.0

With the implementation of multiple selection, some of the apis needed to change to support it, namely OnDateChangedListener is now OnDateSelectedListener. There are also a bunch of new apis for multiple selection.

Also, showOtherDates is now a set of flags for finer control over which extra dates are shown.

Major Change in 0.8.0

The view now responds better to layout parameters. The functionality is similar to how adjustViewBounds works with ImageView, where the view will try and take up as much space as necessary, but we base it on tile size instead of an aspect ratio. The exception being that if a tileSize is set, that will override everything and set the view to that size.

Customization

One of the aims of this library is to be customizable. The many options include:

Events, Highlighting, Custom Selectors, and More!

All of this and more can be done via the decorator api. Please check out the decorator documentation.

Custom Selectors and Colors

If you provide custom drawables or colors, you'll want to make sure they respond to state. Check out the documentation for custom states.

Contributing

Would you like to contribute? Fork us and send a pull request! Be sure to checkout our issues first.

License

Copyright 2016 Prolific Interactive

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.

material-calendarview's People

Contributors

dandc87 avatar ekchang avatar dotnick avatar yuriheupa avatar caltseng avatar kingargyle avatar glennhayward avatar jlindenbaum avatar jogan avatar lucas34 avatar laces avatar gitter-badger avatar johnjohndoe avatar lusfold avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.