aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-07-01 14:48:31 -0700
committerAllan Wang <me@allanwang.ca>2019-07-01 14:48:31 -0700
commit33e415415bafc712a633880812ed90d03246c456 (patch)
treeee48cebdf40b902cedab5f892f598d1f355993be
parent39bda3064e75a8a4be100afa4f5e7adee33c2f17 (diff)
downloadkau-33e415415bafc712a633880812ed90d03246c456.tar.gz
kau-33e415415bafc712a633880812ed90d03246c456.tar.bz2
kau-33e415415bafc712a633880812ed90d03246c456.zip
Update kpref docs
-rw-r--r--core/README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/README.md b/core/README.md
index b9a10f5..b1140bf 100644
--- a/core/README.md
+++ b/core/README.md
@@ -71,6 +71,14 @@ object MyPrefs : KPref() {
Notice that it is a `val` and takes no default. It will return true the first time and false for all subsequent calls.
+### KPref Testing
+
+If your android components can be tested without an emulator, you can also modify KPref to operate without shared preferences.
+To do so, call `KPref(KPrefBuilderInMemory)` when creating your preferences.
+This variant does not pass updates to the shared preferences.
+To set the builder, you may wish to use dependency injection or service locators to supply the builder and the KPref.
+In that case, your preferences would be a class instead of an object.
+
## Changelog XML
Create an xml resource with the following structure: