From 33ad3ab71a06d6505c37b1e23f7d9a82db243c84 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 18 Jul 2020 17:08:50 -0700 Subject: Update fast adapter --- .../main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt | 2 +- .../kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt | 2 +- .../main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt | 2 +- .../main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt | 2 +- .../main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt | 2 +- .../main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt | 2 +- .../src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'kpref-activity/src/main') diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt index a867d06..16900c4 100644 --- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt +++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt @@ -34,7 +34,7 @@ open class KPrefCheckbox(builder: BaseContract) : KPrefItemBase) { + override fun bindView(holder: ViewHolder, payloads: List) { super.bindView(holder, payloads) val checkbox = holder.bindInnerView(R.layout.kau_pref_checkbox) withAccentColor(checkbox::tint) diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt index 76cfbab..d7023af 100644 --- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt +++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt @@ -33,7 +33,7 @@ import com.afollestad.materialdialogs.MaterialDialog */ open class KPrefColorPicker(open val builder: KPrefColorContract) : KPrefItemBase(builder) { - override fun bindView(holder: ViewHolder, payloads: MutableList) { + override fun bindView(holder: ViewHolder, payloads: List) { super.bindView(holder, payloads) if (builder.showPreview) { val preview = holder.bindInnerView(R.layout.kau_pref_color) diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt index ca70b61..6828053 100644 --- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt +++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt @@ -28,7 +28,7 @@ open class KPrefHeader(builder: CoreContract) : KPrefItemCore(builder) { override val layoutRes: Int get() = R.layout.kau_pref_header - override fun bindView(holder: ViewHolder, payloads: MutableList) { + override fun bindView(holder: ViewHolder, payloads: List) { super.bindView(holder, payloads) withAccentColor(holder.title::setTextColor) } diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt index 16363e2..22be523 100644 --- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt +++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt @@ -47,7 +47,7 @@ abstract class KPrefItemBase(protected val base: BaseContract) : KPrefItem } @CallSuper - override fun bindView(holder: ViewHolder, payloads: MutableList) { + override fun bindView(holder: ViewHolder, payloads: List) { super.bindView(holder, payloads) _enabled = base.enabler() with(holder) { 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 79b7e82..0aaa2d3 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 @@ -70,7 +70,7 @@ abstract class KPrefItemCore(val core: CoreContract) : AbstractItem) { + override fun bindView(holder: ViewHolder, payloads: List) { super.bindView(holder, payloads) with(holder) { updateTitle() diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt index 9abdf09..41efa42 100644 --- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt +++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt @@ -37,7 +37,7 @@ open class KPrefSeekbar(val builder: KPrefSeekbarContract) : KPrefItemBase( override fun KClick.defaultOnClick() = Unit - override fun bindView(holder: ViewHolder, payloads: MutableList) { + override fun bindView(holder: ViewHolder, payloads: List) { super.bindView(holder, payloads) val text = holder.bindInnerView(R.layout.kau_pref_seekbar_text) withTextColor(text::setTextColor) 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 50f0c62..b5a69dd 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(open val builder: KPrefTextContract) : KPrefItemBase< context.toast("No click function set") } - override fun bindView(holder: ViewHolder, payloads: MutableList) { + override fun bindView(holder: ViewHolder, payloads: List) { super.bindView(holder, payloads) val textView = holder.bindInnerView(R.layout.kau_pref_text) withTextColor(textView::setTextColor) -- cgit v1.2.3