aboutsummaryrefslogtreecommitdiff
path: root/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
diff options
context:
space:
mode:
authorAllan Wang <allanwang@google.com>2019-07-27 18:59:14 -0700
committerAllan Wang <allanwang@google.com>2019-07-27 18:59:14 -0700
commit63f6b70cc81ec9dc6e92b6521dfd78fa72fe70a5 (patch)
treea7fdc9cd1ec78a6bd43c80fec33896a3d427d2b6 /kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
parent99f1e76a4d8d35d4d3ca1aadf68bbc227a70ba01 (diff)
downloadkau-63f6b70cc81ec9dc6e92b6521dfd78fa72fe70a5.tar.gz
kau-63f6b70cc81ec9dc6e92b6521dfd78fa72fe70a5.tar.bz2
kau-63f6b70cc81ec9dc6e92b6521dfd78fa72fe70a5.zip
Fix compile errors
Diffstat (limited to 'kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt')
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
index 76c9e20..50f0c62 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
@@ -46,7 +46,7 @@ open class KPrefText<T>(open val builder: KPrefTextContract<T>) : KPrefItemBase<
context.toast("No click function set")
}
- override fun bindView(holder: ViewHolder, payloads: List<Any>) {
+ override fun bindView(holder: ViewHolder, payloads: MutableList<Any>) {
super.bindView(holder, payloads)
val textView = holder.bindInnerView<TextView>(R.layout.kau_pref_text)
withTextColor(textView::setTextColor)
@@ -68,9 +68,11 @@ open class KPrefText<T>(open val builder: KPrefTextContract<T>) : KPrefItemBase<
titleId: Int,
getter: () -> T,
setter: KPrefItemActions.(value: T) -> Unit
- ) : KPrefTextContract<T>, BaseContract<T> by BaseBuilder<T>(globalOptions, titleId, getter, setter) {
+ ) : KPrefTextContract<T>,
+ BaseContract<T> by BaseBuilder<T>(globalOptions, titleId, getter, setter) {
override var textGetter: (T) -> String? = { it?.toString() }
}
- override fun getType(): Int = R.id.kau_item_pref_text
+ override val type: Int
+ get() = R.id.kau_item_pref_text
}