This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
1,074 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
**Fixes:** #<Issue ID> | ||
|
||
|
||
## Description | ||
<!-- A few sentences describing the overall goals of the pull request's commits. | ||
What is the current behavior of the app? What is the updated/expected behavior with this PR? --> | ||
|
||
|
||
|
||
|
||
## Checklist | ||
<!-- Check all items that apply using "x" --> | ||
|
||
- [ ] Tested on actual devices | ||
- [ ] Commit messages follow conventionalcommits.org | ||
|
||
|
||
<!-- Add this section if you need it. | ||
## Before & After Screenshots | ||
| Description 1 | Description 2 | Description 3 | | ||
| :------------: | :------------: | :------------: | | ||
| <screenshot 1> | <screenshot 2> | <screenshot 3> | | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
|
||
<!-- Template: | ||
## [Unreleased] - 2018-xx-xx | ||
Optional intro comment. | ||
- Added: Abc ([#](https://github.com/JonasWanke/com.jonaswanke.calendar/pull/)), fixes [#](https://github.com/JonasWanke/com.jonaswanke.calendar/issues/) | ||
- Changed: Abc ([#](https://github.com/JonasWanke/com.jonaswanke.calendar/pull/)), fixes [#](https://github.com/JonasWanke/com.jonaswanke.calendar/issues/) | ||
- Deprecated: Abc ([#](https://github.com/JonasWanke/com.jonaswanke.calendar/pull/)), fixes [#](https://github.com/JonasWanke/com.jonaswanke.calendar/issues/) | ||
- Removed: Abc ([#](https://github.com/JonasWanke/com.jonaswanke.calendar/pull/)), fixes [#](https://github.com/JonasWanke/com.jonaswanke.calendar/issues/) | ||
- Fixed: Abc ([#](https://github.com/JonasWanke/com.jonaswanke.calendar/pull/)), fixes [#](https://github.com/JonasWanke/com.jonaswanke.calendar/issues/) | ||
- Security: Abc ([#](https://github.com/JonasWanke/com.jonaswanke.calendar/pull/)), fixes [#](https://github.com/JonasWanke/com.jonaswanke.calendar/issues/) | ||
--> | ||
|
||
|
||
## [Unreleased] - 2018-xx-xx | ||
|
||
|
||
## [0.0.2] - 2018-xx-xx | ||
|
||
- Added: support support scroll and zoom for days ([#15](https://github.com/JonasWanke/com.jonaswanke.calendar/pull/15)), closes [#6](https://github.com/JonasWanke/com.jonaswanke.calendar/issues/6) | ||
- Added: add readme and changelog ([#](https://github.com/JonasWanke/com.jonaswanke.calendar/pull/5)), closes [#](https://github.com/JonasWanke/com.jonaswanke.calendar/issues/5) | ||
- Fixed: adapt week start to device's locale ([#11](https://github.com/JonasWanke/com.jonaswanke.calendar/pull/11)), closes [#1](https://github.com/JonasWanke/com.jonaswanke.calendar/issues/1) | ||
- Fixed: handle config changes correctly in CalendarView ([#16](https://github.com/JonasWanke/com.jonaswanke.calendar/pull/16)), closes [#3](https://github.com/JonasWanke/com.jonaswanke.calendar/issues/3) | ||
- Performance: speed up horizontal scrolling ([#10](https://github.com/JonasWanke/com.jonaswanke.calendar/pull/10)), closes [#7](https://github.com/JonasWanke/com.jonaswanke.calendar/issues/7) | ||
|
||
|
||
## 0.0.1 - 2018-07-24 | ||
|
||
Initial release supporting week view. | ||
|
||
|
||
[Unreleased]: https://github.com/JonasWanke/com.jonaswanke.calendar/compare/v0.0.2...dev | ||
[0.0.2]: https://github.com/JonasWanke/com.jonaswanke.calendar/compare/v0.0.1...v0.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,84 @@ | ||
# com.jonaswanke.calendar | ||
# CalendarView | ||
|
||
[![GitHub version](https://img.shields.io/github/release/JonasWanke/com.jonaswanke.calendar/all.svg?colorB=4c1)](https://github.com/JonasWanke/com.jonaswanke.calendar/releases) | ||
[![GitHub version](https://img.shields.io/github/commits-since/JonasWanke/com.jonaswanke.calendar/latest.svg?colorB=4c1)](https://github.com/JonasWanke/com.jonaswanke.calendar/releases) | ||
|
||
[![Apache 2.0 license](https://img.shields.io/badge/License-Apache%202.0-green.svg?colorB=4c1)](http://www.apache.org/licenses/LICENSE-2.0) | ||
[![Awesome Badges](https://img.shields.io/badge/badges-awesome-green.svg?colorB=4c1)](https://github.com/Naereen/badges) | ||
|
||
|
||
This library provides a Material Design CalendarView for Android (week view; more coming soon!). The default style is copied from the Google Calendar app, but almost everything is customizable. | ||
|
||
| Screenshot of the [example app][example] | Zoomed in | | ||
| :--------------------------------------: | :---------------------------------------: | | ||
| ![image](docs/assets/screenshot.jpg) | ![image](docs/assets/screenshot-zoom.jpg) | | ||
|
||
|
||
- [CalendarView](#calendarview) | ||
- [Usage](#usage) | ||
- [Sample](#sample) | ||
- [Customization](#customization) | ||
- [Changelog](#changelog) | ||
|
||
|
||
## Usage | ||
|
||
1. Import the library | ||
|
||
```groovy | ||
implementation 'com.jonaswanke.calendar:calendar:0.0.2' | ||
``` | ||
|
||
2. Add CalendarView in you layout | ||
|
||
```xml | ||
<com.jonaswanke.calendar.CalendarView | ||
android:id="@+id/calendar" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" /> | ||
``` | ||
|
||
3. Provide events to the view | ||
|
||
```kotlin | ||
calendar.eventRequestCallback = { week -> | ||
// retrieve events synchronously or asynchronously | ||
launch(UI) { | ||
val events: List<Event> = // ... | ||
calendar.setEventsForWeek(week, events) | ||
} | ||
} | ||
``` | ||
|
||
You can call CalendarView.setEventsForWeek() anytime you want. The events will be cached and used when required. Old events for that week are overridden. | ||
|
||
4. Add your listeners | ||
|
||
```kotlin | ||
calendar.onEventClickListener = { event -> | ||
// event was clicked | ||
Toast.makeText(this, event.title + " clicked", Toast.LENGTH_LONG).show() | ||
} | ||
calendar.onEventLongClickListener = { event -> | ||
// event was long clicked | ||
Toast.makeText(this, event.title + " long clicked", Toast.LENGTH_LONG).show() | ||
} | ||
``` | ||
|
||
|
||
## Sample | ||
|
||
There is also a [sample app][example] to get you started. | ||
|
||
|
||
## Customization | ||
|
||
*Following soon...* | ||
|
||
|
||
## Changelog | ||
|
||
See [here][changelog] for the changelog. | ||
|
||
[example]: ./example | ||
[changelog]: ./CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.