diff options
author | Allan Wang <me@allanwang.ca> | 2017-08-05 15:08:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-05 15:08:52 -0700 |
commit | a2a11ff0558ffb498ce56e08af74139a4650d843 (patch) | |
tree | a701921e7cd124f15d10e388b88f55c290d1d708 | |
parent | c707d42b311f96cbabc1971f98598c8b8922ba16 (diff) | |
download | kau-a2a11ff0558ffb498ce56e08af74139a4650d843.tar.gz kau-a2a11ff0558ffb498ce56e08af74139a4650d843.tar.bz2 kau-a2a11ff0558ffb498ce56e08af74139a4650d843.zip |
Update readme and gifs (#25)
* Add docs
* Update readme
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | core/README.md | 24 |
2 files changed, 29 insertions, 5 deletions
@@ -26,7 +26,8 @@ allprojects { ... jcenter() maven { url "https://jitpack.io" } - maven { url "https://maven.google.com" } + maven { url "https://maven.google.com" } //for gradle < 4.0 + google() //for gradle >= 4.0 } } ``` @@ -55,12 +56,12 @@ dependencies { ----------- # Submodules -> linked to their respective Docs -> included dependencies are only those with exposed APIs. See [new dependency configurations](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#new_configurations) +> Linked to their respective docs.<br/> +> Included dependencies are only those with exposed APIs; see [new dependency configurations](https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#new_configurations). ## [Core](core#readme) * Collection of extension functions and small helper methods applicable in almost any application. -* Notable features: KPrefs, Changelog XML, Kotterknife, Ripple Canvas, Delegates, Lazy Resettables, Extensions, Email Builder +* Notable features: KPrefs, Changelog XML, Kotterknife, Ripple Canvas, Delegates, Swipe, Lazy Resettables, Extensions, Email Builder * Includes [`AppCompat`](https://developer.android.com/topic/libraries/support-library/index.html), [`Material Dialogs (core)`](https://github.com/afollestad/material-dialogs), @@ -115,6 +116,7 @@ dependencies { ![Color Picker Custom Gif](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/kau/kau_color_picker_custom.gif) ![KPref Items Gif](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/kau/kau_kpref_items.gif) ![SearchView Gif](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/kau/kau_search_view.gif) +![Swipe Gif](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/kau/kau_swipe.gif) # Proguard/MultiDex diff --git a/core/README.md b/core/README.md index 385c7ed..998226b 100644 --- a/core/README.md +++ b/core/README.md @@ -11,6 +11,7 @@ * [Ripple Canvas](#ripple-canvas) * [MeasureSpecDelegate](#measure-spec-delegate) * [CollapsibleViewDelegate](#collapsible-view-delegate) +* [Swipe](#swipe) * [Timber Logger](#timber-logger) * [Email Builder](#email-builder) * [Extensions](#extensions) @@ -151,13 +152,34 @@ If you ever have a view needing exact aspect ratios with its parent and/or itsel Implementing this in any view class unlocks its attributes, giving you three layers of view measuring to ensure exact sizing. More information can be found in the [klass file](https://github.com/AllanWang/KAU/blob/master/core/src/main/kotlin/ca/allanwang/kau/ui/views/MeasureSpecDelegate.kt) -< a name="collapsible-view-delegate"></a> +<a name="collapsible-view-delegate"></a> ## Collapsible View Delegate A common animation is having a view that can smoothly enter and exit by changing its height. This delegate will implement everything for you and give you the methods `expand`, `collapse`, etc. See the [kclass file](https://github.com/AllanWang/KAU/blob/master/core/src/main/kotlin/ca/allanwang/kau/ui/views/CollapsibleViewDelegate.kt) for more details. +<a name="swipe"></a> +# Swipe + +A collection of activity extension methods to easily make any activity swipable: + +![Swipe Gif](https://raw.githubusercontent.com/AllanWang/Storage-Hub/master/kau/kau_swipe.gif) + +Simply add the following three calls in the appropriate overriding methods: + +```kotlin +kauSwipeOnCreate() //in the onCreate method; you may also pass settings through here +kauSwipeOnPostCreate() //in the onPostCreate method +kauSwipeOnDestroy() //in the onDestroy method + +kauSwipeFinish() //optional; replace onBackPressed with this to animate the activity finish +``` + +Special thanks goes to the original project, [SwipeBackHelper](https://github.com/Jude95/SwipeBackHelper) + +KAU's swipe is a Kotlin rewrite, along with support for all directions and weakly referenced contexts. + <a name="timber-logger"></a> ## Timber Logger |