aboutsummaryrefslogtreecommitdiff
path: root/kpref-activity/src/main
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-02-23 20:52:21 -0500
committerGitHub <noreply@github.com>2018-02-23 20:52:21 -0500
commit3d7c85bd97261116a090a7202b0e0ed2625b5d73 (patch)
treef8d6409ef847a1ca0c0ba3640a27984703de470e /kpref-activity/src/main
parent20f0d085d6940be30b076a8cff3de25fe4a6e21a (diff)
downloadkau-3d7c85bd97261116a090a7202b0e0ed2625b5d73.tar.gz
kau-3d7c85bd97261116a090a7202b0e0ed2625b5d73.tar.bz2
kau-3d7c85bd97261116a090a7202b0e0ed2625b5d73.zip
Misc (#140)
* Nullify task * Rewrite circle view * Add better encapsulation * Update annotations * Update kpref annotations * Begin writing tests for color picker * Add color selection tests * Update changelog * Cleanup
Diffstat (limited to 'kpref-activity/src/main')
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefBinder.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt2
2 files changed, 3 insertions, 1 deletions
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefBinder.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefBinder.kt
index 637af03..a9e21ff 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefBinder.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefBinder.kt
@@ -77,7 +77,7 @@ class KPrefAdapterBuilder(val globalOptions: GlobalOptions) {
getter: (() -> T),
setter: ((value: T) -> Unit),
builder: KPrefText.KPrefTextContract<T>.() -> Unit = {})
- = list.add(KPrefText<T>(KPrefText.KPrefTextBuilder<T>(globalOptions, title, getter, setter)
+ = list.add(KPrefText(KPrefText.KPrefTextBuilder(globalOptions, title, getter, setter)
.apply { builder() }))
@KPrefMarker
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
index 2afdd2e..992dd28 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
import android.support.annotation.CallSuper
import android.support.annotation.IdRes
import android.support.annotation.LayoutRes
+import android.support.annotation.StringRes
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
@@ -100,6 +101,7 @@ abstract class KPrefItemCore(val core: CoreContract) : AbstractItem<KPrefItemCor
val globalOptions: GlobalOptions
val titleId: Int
var titleFun: () -> Int
+ @setparam:StringRes
var descRes: Int
var descFun: () -> Int
var iicon: IIcon?