diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-31 23:02:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-31 23:02:01 -0700 |
commit | 48213d0b427c478865c75fee912ff1ae8bbaffb5 (patch) | |
tree | 7aef1d8400fc3403ee5a40aba945f33a95319359 /core/README.md | |
parent | 8a4e9fd44dfbcf58aa7ab63167dcbdf8752db7d0 (diff) | |
download | kau-48213d0b427c478865c75fee912ff1ae8bbaffb5.tar.gz kau-48213d0b427c478865c75fee912ff1ae8bbaffb5.tar.bz2 kau-48213d0b427c478865c75fee912ff1ae8bbaffb5.zip |
Major update to core and kotterknife; create mediapicker (#15)
* Readme
* Fix kau direction bits
* Truly support transparent ripples
* Update changelog
* Test rect as base
* Replace fab transition with generic fade scale transition
* Add scalexy func
* Add scaleXY
* Add arguments to fadeScaleTransition
* Clean up ink indicator
* Create setOnSingleTapListener
* Fix lint and add rndColor
* Create kotterknife resettables
* Add readme and missing object
* Create lazy resettable registered
* Update core docs
* Opt for separate class for resettable registry
* Clean up resettable registry
* Rename functions
* Add ripple callback listener
* Adjust kprefactivity desc color
* Add more transitions
* Add delete keys option
* Add instrumentation tests
* switch id
* Revert automatic instrumental tests
* Generify imagepickercore and prepare video alternative
* Create working video picker
* Address possible null issue
* Update searchview
* Make layouts public
* Add changelog test
* Update logo link
* Add custom color gif
Diffstat (limited to 'core/README.md')
-rw-r--r-- | core/README.md | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/core/README.md b/core/README.md index 63313ac..c26836e 100644 --- a/core/README.md +++ b/core/README.md @@ -6,10 +6,13 @@ * [KPrefs](#kprefs) * [Changelog XML](#changelog) +* [Kotterknife](#kotterknife) * [Ripple Canvas](#ripple-canvas) +* [MeasureSpecDelegate](#measure-spec-delegate) * [Timber Logger](#timber-logger) * [Email Builder](#email-builder) * [Extensions](#extensions) +* [Lazy Resettable](#lazy-resettable) <a name="kprefs"></a> ## KPrefs @@ -103,6 +106,17 @@ Here is a template xml changelog file: </resources> ``` +<a name="kotterknife"></a> +## Kotterknife + +KAU comes shipped with [Kotterknife](https://github.com/JakeWharton/kotterknife) by Jake Wharton. +It is a powerful collection of lazy view bindings that only calls the expensive `findViewById` once. + +In KAU, there are also resettable versions (suffixed with `Resettable`) for all bindings. +These variants are weakly held in the private `KotterknifeRegistry` object, and can be used to invalidate the lazy +values through the `Kotterknife.reset` method. This is typically useful for Fragments, as they do not follow +the same lifecycle as Activities and Views. + <a name="ripple-canvas"></a> ## Ripple Canvas @@ -114,6 +128,13 @@ They can be used as transitions, or as a toolbar background to replicate the loo Many ripples can be stacked on top of each other to run at the same time from different locations. The canvas also supports color fading and direct color setting so it can effectively replace any background. +<a name="measure-spec-delegate"></a> +## Measure Spec Delegate + +If you ever have a view needing exact aspect ratios with its parent and/or itself, this delegate is here to help. +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="timber-logger"></a> ## Timber Logger @@ -134,4 +155,14 @@ Include your email and subject, along with other optional configurations such as Note that since KAU depends on [ANKO](https://github.com/Kotlin/anko), all of the extensions in its core package is also in KAU. KAU's vast collection of extensions is one of its strongest features. -There are too many to explain here, but you may check out the [utils package](https://github.com/AllanWang/KAU/tree/master/core/src/main/kotlin/ca/allanwang/kau/utils)
\ No newline at end of file +There are too many to explain here, but you may check out the [utils package](https://github.com/AllanWang/KAU/tree/master/core/src/main/kotlin/ca/allanwang/kau/utils) + +<a name="lazy-resettable></a> +## Lazy Resettable + +In the spirit of Kotlin's Lazy delegate, KAU supports a resettable version. Calling `lazyResettable` produces the same delegate, +but with an additional `invalidate` method. + +To further simplify this, there is also a `LazyResettableRegistry` class that can be used to hold all resettables. +The instance can be passed through the `lazyResettable` method, or classes can provide their own extension functions to +register the delegates by default.
\ No newline at end of file |