diff options
author | Allan Wang <me@allanwang.ca> | 2017-08-07 22:20:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-07 22:20:57 -0700 |
commit | 02e1dbc84425b0ac7f771c82f70444f742397452 (patch) | |
tree | 05e978e7588e30ce653428671f3d9f5df5397385 /kpref-activity/README.md | |
parent | 187d8e64dc7189f63707d154166867084662dbe3 (diff) | |
download | kau-02e1dbc84425b0ac7f771c82f70444f742397452.tar.gz kau-02e1dbc84425b0ac7f771c82f70444f742397452.tar.bz2 kau-02e1dbc84425b0ac7f771c82f70444f742397452.zip |
Release 3.3.0 (#32)3.3.0
* Rewrite Logger (#29)
* Remove dependency on timber
* Update logger
* Reorder throwabl
* Fix lint
* Update readme
* Blank target
* Create Zip (#30)
* Finish zips with tests
* Finalize
* Update changelog
* Add log hooks
* Open most logging functions
* Remap kpref items (#31)
* Update readme
* Generate files and prepare release
* Kpref -
Diffstat (limited to 'kpref-activity/README.md')
-rw-r--r-- | kpref-activity/README.md | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/kpref-activity/README.md b/kpref-activity/README.md index 5ec94a6..015d0d8 100644 --- a/kpref-activity/README.md +++ b/kpref-activity/README.md @@ -39,9 +39,6 @@ An example of the adapter builder: ```kotlin override fun onCreateKPrefs(savedInstanceState: android.os.Bundle?): KPrefAdapterBuilder.() -> Unit = { - - textColor = { KPrefSample.textColor } // getter function so the new text color will be retrieved for every reload - accentColor = { KPrefSample.accentColor } header(R.string.header) @@ -66,4 +63,17 @@ override fun onCreateKPrefs(savedInstanceState: android.os.Bundle?): KPrefAdapte } } } +``` + +On top of per item configurations, `KPrefActivity` has some core attributes that you can define on creation. +It is done through the abstract function: + +```kotlin + + override fun kPrefCoreAttributes(): CoreAttributeContract.() -> Unit = { + textColor = { Prefs.textColor } // text color getter; refreshes automatically on reload + accentColor = { Prefs.accentColor } // accent color getter + // background color does not exist as it is done through the ripple canvas + } + ```
\ No newline at end of file |