diff options
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.kt | 10 |
1 files changed, 5 insertions, 5 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 fa45b04..2ab911b 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 @@ -30,11 +30,11 @@ open class KPrefText<T>(open val builder: KPrefTextContract<T>) : KPrefItemBase< context.toast("No click function set") } - override fun onPostBindView(viewHolder: ViewHolder, textColor: Int?, accentColor: Int?) { - super.onPostBindView(viewHolder, textColor, accentColor) - val textview = viewHolder.bindInnerView<TextView>(R.layout.kau_pref_text) - if (textColor != null) textview.setTextColor(textColor) - textview.text = builder.textGetter(pref) + override fun bindView(holder: ViewHolder, payloads: List<Any>) { + super.bindView(holder, payloads) + val textView = holder.bindInnerView<TextView>(R.layout.kau_pref_text) + withTextColor(textView::setTextColor) + textView.text = builder.textGetter(pref) } /** |