aboutsummaryrefslogtreecommitdiff
path: root/core/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'core/README.md')
-rw-r--r--core/README.md24
1 files changed, 23 insertions, 1 deletions
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