Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/0.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed Jul 30, 2018
2 parents be60278 + 5604790 commit a9a53e6
Show file tree
Hide file tree
Showing 24 changed files with 1,074 additions and 275 deletions.
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
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> |
-->
42 changes: 42 additions & 0 deletions CHANGELOG.md
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
85 changes: 84 additions & 1 deletion README.md
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
8 changes: 4 additions & 4 deletions calendar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "0.0.1"
versionCode 2
versionName "0.0.2"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down Expand Up @@ -52,9 +52,9 @@ ext {

siteUrl = 'https://github.com/JonasWanke/com.jonaswanke.calendar'
gitUrl = 'https://github.com/JonasWanke/com.jonaswanke.calendar.git'
githubRepository= 'JonasWanke/com.jonaswanke.calendar'
githubRepository = 'JonasWanke/com.jonaswanke.calendar'

libraryVersion = '0.0.1'
libraryVersion = '0.0.2'

developerId = 'JonasWanke'
developerName = 'Jonas Wanke'
Expand Down
Loading

0 comments on commit a9a53e6

Please sign in to comment.