aboutsummaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-12-31 15:07:05 -0500
committerGitHub <noreply@github.com>2017-12-31 15:07:05 -0500
commite2009a3e33a58bab37f433845f6d105cb7821da1 (patch)
treeb23f3587db872be7b7ac6a4885862c7d56e35be3 /sample
parent2718156fe63304ffb792cc3cb8592ad6e494a8b0 (diff)
downloadkau-e2009a3e33a58bab37f433845f6d105cb7821da1.tar.gz
kau-e2009a3e33a58bab37f433845f6d105cb7821da1.tar.bz2
kau-e2009a3e33a58bab37f433845f6d105cb7821da1.zip
Enhancement/logger (#120)
* Rewrite logger to use lazy loading * Clean up and add to changelog
Diffstat (limited to 'sample')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt2
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt2
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml5
3 files changed, 6 insertions, 3 deletions
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
index 3f25ac3..2ba3366 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
@@ -32,7 +32,7 @@ class AnimActivity : KauBaseActivity() {
PERMISSION_CAMERA
).map { PermissionCheckbox(it) })
adapter.withOnClickListener { _, _, item, _ ->
- KL.d("Perm Click")
+ KL.d { "Perm Click" }
kauRequestPermissions(item.permission) { granted, _ ->
toast("${item.permission} enabled: $granted")
adapter.notifyAdapterDataSetChanged()
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt
index 541eaec..30c877b 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt
@@ -9,7 +9,7 @@ import ca.allanwang.kau.logging.KL
class SampleApp : Application() {
override fun onCreate() {
super.onCreate()
- KL.debug(BuildConfig.DEBUG)
+ KL.enabled = BuildConfig.DEBUG
KPrefSample.initialize(this, "pref_sample")
}
} \ No newline at end of file
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index 6356ef4..59914a3 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -6,6 +6,10 @@
<item text="" />
-->
+
+ <version title="v3.6.1" />
+ <item text=":core: [Breaking] Removed private text field and introduced lazy logging functions" />
+
<version title="v3.6.0" />
<item text=":adapter: Create withOnRepeatedClickListener" />
<item text=":core: Create kotlin flyweight" />
@@ -13,7 +17,6 @@
<item text=":core: [Breaking] Refactored startActivity functions" />
<item text=":kpref-activity: [Breaking] Simplified listener function parameters" />
<item text=":kpref-activity: [Breaking] Added dynamic string loading options" />
- <item text="" />
<item text="(See Migrations.md for further details on breaking changes)" />
<version title="v3.5.1" />