From 3d7c85bd97261116a090a7202b0e0ed2625b5d73 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 23 Feb 2018 20:52:21 -0500 Subject: 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 --- .../src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefBinder.kt | 2 +- .../main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'kpref-activity') 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.() -> Unit = {}) - = list.add(KPrefText(KPrefText.KPrefTextBuilder(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 Int + @setparam:StringRes var descRes: Int var descFun: () -> Int var iicon: IIcon? -- cgit v1.2.3