Skip to content

Commit dad582d

Browse files
committed
Bump version to 1.9.0 and update Readme.
1 parent 800528f commit dad582d

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

README.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,41 @@
22
[![Build Status](https://www.bitrise.io/app/6ba47c24369dd52a/status.svg?token=XyF0AXasZwgKuoub_tJUYA&branch=master)](https://www.bitrise.io/app/6ba47c24369dd52a)
33

44
# Android Week View
5-
Android library for displaying an overview of events for a week like in a schedule(us) or timetable(uk).
65

7-
It's the week view initially used in Schedule Deluxe (https://play.google.com/store/apps/details?id=com.tobiasschuerg.stundenplan),
6+
Android library for displaying an overview of events for a week
7+
like in a schedule(us) or timetable(uk).
8+
9+
It's the week view initially used in Schedule
10+
Deluxe (https://play.google.com/store/apps/details?id=com.tobiasschuerg.stundenplan),
811
which is now outsourced in favor of a better modularization.
912

1013
<img src="https://github.com/tobiasschuerg/android-week-view/blob/master/meta/device-2018-02-24-121341.png" height="400">
1114

1215
## Usage:
16+
1317
See `SampleActivity.kt` for how to use the week view.
1418

1519
### In short:
20+
1621
1. Attach the view to your layout:
22+
1723
```xml
18-
<de.tobiasschuerg.weekview.view.WeekView
19-
android:id="@+id/week_view"
20-
android:layout_width="match_parent"
21-
android:layout_height="wrap_content"
22-
app:accent_color="@color/colorAccent"
23-
app:start_hour="8"
24-
app:end_hour="15" />
24+
25+
<de.tobiasschuerg.weekview.view.WeekView android:id="@+id/week_view"
26+
android:layout_width="match_parent" android:layout_height="wrap_content"
27+
app:accent_color="@color/colorAccent" app:start_hour="8" app:end_hour="15" />
2528
```
29+
2630
2. Configure how events are displayed (optional):
31+
2732
```kotlin
2833
val config = EventConfig(showSubtitle = false, showTimeEnd = false)
2934
weekView.eventConfig = config
3035
weekView.setShowNowIndicator(true)
3136
```
3237

3338
3Add events:
39+
3440
```kotlin
3541
val nowEvent = Event.Single(
3642
id = 1337,
@@ -44,10 +50,15 @@ val nowEvent = Event.Single(
4450
weekView.addEvent(nowEvent)
4551
```
4652

53+
## Desugaring:
54+
55+
Starting from version 1.8.0, Android Week View has switched from JakeWharton's ThreeTen Backport
56+
to desugaring for `java.time`-API.
4757

4858
## Get it
4959

5060
1. Add it in your root build.gradle at the end of repositories:
61+
5162
```gradle
5263
allprojects {
5364
repositories {
@@ -56,7 +67,9 @@ allprojects {
5667
}
5768
}
5869
```
70+
5971
2. Step 2. Add the dependency
72+
6073
```gradle
6174
dependencies {
6275
compile 'com.github.tobiasschuerg:android-week-view:-SNAPSHOT'

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.lib_version = '1.8.1' // this lib
5-
ext.kotlin_version = '1.9.20'
4+
ext.lib_version = '1.9.0' // this lib
5+
ext.kotlin_version = '1.9.22'
66

77
repositories {
88
google()
@@ -31,6 +31,6 @@ allprojects {
3131
}
3232
}
3333

34-
task clean(type: Delete) {
34+
tasks.register('clean', Delete) {
3535
delete rootProject.buildDir
3636
}

0 commit comments

Comments
 (0)