aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-26 19:43:43 -0700
committerAllan Wang <me@allanwang.ca>2017-06-26 19:43:43 -0700
commitcb2da7537c544e847373981a861b6a8ec151b847 (patch)
tree243990004701c724b54d52b1fac61d317ea59eb2
parentc46fb11e0a8297b1ff7caec722488218e3834ac9 (diff)
downloadkau-cb2da7537c544e847373981a861b6a8ec151b847.tar.gz
kau-cb2da7537c544e847373981a861b6a8ec151b847.tar.bz2
kau-cb2da7537c544e847373981a861b6a8ec151b847.zip
Add kpref item readme
-rw-r--r--README.md8
-rw-r--r--sample/src/main/res/xml/changelog.xml2
2 files changed, 8 insertions, 2 deletions
diff --git a/README.md b/README.md
index 596ac0e..e53a81b 100644
--- a/README.md
+++ b/README.md
@@ -90,6 +90,8 @@ There is also a `reset()` method to clear the local values and have them retriev
KAU supports Preferences that are created without xmls and through AppCompat.
The items are backed by a [FastAdapter](https://github.com/mikepenz/FastAdapter) and support [iicons](https://github.com/mikepenz/Android-Iconics)
+<img src="https://github.com/AllanWang/Storage-Hub/blob/master/kau/kau_kpref_items.gif">
+
The easiest way to create the settings is to extend `KPrefActivity`.
We will then override `onCreateKPrefs` to generate our adapter builder.
@@ -106,6 +108,7 @@ Contract | Mandatory | Optional | Description
`BaseContract` | `getter` `setter` | `enabler` `onClick` `onDisabledClick` | Implemented by every preference item
`KPrefColorContract` | `NA` | `showPreview` | Additional configurations for the color picker
`KPrefTextContract` | `NA` | `textGetter` | Additional configurations for the text item
+`KPrefSubItemsContract` | `itemBuilder` | `NA` | Contains a new list for the adapter to load when clicked
The kpref items are as followed:
@@ -115,6 +118,9 @@ Item | Implements | Description
`colorPicker` | `CoreContract` `BaseContract` `KPrefColorContract` | Color picker item; by default, clicking it will open a dialog which will change the color (int)
`header` | `CoreContract` | Header; just a title that isn't clickable
`text` | `CoreContract` `BaseContract` `KPrefTextContract` | Text item; displays the kpref as a String on the right; does not have click implementation by default
+`plainText` | `BaseContract` | Plain text item; like `text` but does not deal with any preferences directly, so it doesn't need a getter or setter
+This can be used to display text or deal with preference that are completely handed within the click event (eg a dialog).
+`subItems` | `CoreContract` `KPrefSubItemsContract` | Sub items; contains a new page for the activity to load when clicked
An example of the adapter builder:
@@ -174,7 +180,7 @@ As mentioned, blank items will be ignored, so feel free to create a bunch of emp
## Search View
Kau contains a fully functional SearchView that can be added programmatically with one line.
-It contains the `bindSearchView` extension functions from both an activity or viewgroup.
+It contains a `bindSearchView` extension functions for both activities and viewgroups.
<img src="https://github.com/AllanWang/Storage-Hub/blob/master/kau/kau_search_view.gif">
diff --git a/sample/src/main/res/xml/changelog.xml b/sample/src/main/res/xml/changelog.xml
index 55ddd34..d864f74 100644
--- a/sample/src/main/res/xml/changelog.xml
+++ b/sample/src/main/res/xml/changelog.xml
@@ -11,7 +11,7 @@
<item text="Added DSL markers" />
<item text="Added transition utils and other utils" />
<item text="Added custom searchview with binders" />
- <item text="" />
+ <item text="Added KauBoundedCardView" />
<item text="" />
<item text="" />
<item text="" />