diff --git a/README.md b/README.md index 59372d0..dfc89f9 100644 --- a/README.md +++ b/README.md @@ -2,28 +2,33 @@ [![Build Status](https://www.bitrise.io/app/6ba47c24369dd52a/status.svg?token=XyF0AXasZwgKuoub_tJUYA&branch=master)](https://www.bitrise.io/app/6ba47c24369dd52a) # Android Week View -Android library for displaying an overview of events for a week like in a schedule(us) or timetable(uk). -It's the week view initially used in Schedule Deluxe (https://play.google.com/store/apps/details?id=com.tobiasschuerg.stundenplan), +Android library for displaying an overview of events for a week +like in a schedule(us) or timetable(uk). + +It's the week view initially used in Schedule +Deluxe (https://play.google.com/store/apps/details?id=com.tobiasschuerg.stundenplan), which is now outsourced in favor of a better modularization. ## Usage: + See `SampleActivity.kt` for how to use the week view. ### In short: + 1. Attach the view to your layout: + ```xml - + + ``` + 2. Configure how events are displayed (optional): + ```kotlin val config = EventConfig(showSubtitle = false, showTimeEnd = false) weekView.eventConfig = config @@ -31,6 +36,7 @@ weekView.setShowNowIndicator(true) ``` 3Add events: + ```kotlin val nowEvent = Event.Single( id = 1337, @@ -44,10 +50,15 @@ val nowEvent = Event.Single( weekView.addEvent(nowEvent) ``` +## Desugaring: + +Starting from version 1.8.0, Android Week View has switched from JakeWharton's ThreeTen Backport +to desugaring for `java.time`-API. ## Get it 1. Add it in your root build.gradle at the end of repositories: + ```gradle allprojects { repositories { @@ -56,7 +67,9 @@ allprojects { } } ``` + 2. Step 2. Add the dependency + ```gradle dependencies { compile 'com.github.tobiasschuerg:android-week-view:-SNAPSHOT' diff --git a/build.gradle b/build.gradle index 2ab117f..cb118f7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.lib_version = '1.8.1' // this lib - ext.kotlin_version = '1.9.20' + ext.lib_version = '1.9.0' // this lib + ext.kotlin_version = '1.9.22' repositories { google() @@ -31,6 +31,6 @@ allprojects { } } -task clean(type: Delete) { +tasks.register('clean', Delete) { delete rootProject.buildDir }