aboutsummaryrefslogtreecommitdiff
path: root/core/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'core/README.md')
-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: