From 0af8b379fc0968c830c8938e1998b5bd3dd7e0aa Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 9 Jul 2017 00:48:59 -0700 Subject: Update resource prefixes --- .../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 +- .../kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt | 2 +- .../main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt | 4 ++-- .../kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt | 2 +- .../main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'kpref-activity/src/main/kotlin') 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 baefba7..19bdb56 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 @@ -21,7 +21,7 @@ open class KPrefCheckbox(builder: BaseContract) : KPrefItemBase(R.layout.kau_preference_checkbox) + val checkbox = viewHolder.bindInnerView(R.layout.kau_pref_checkbox) if (accentColor != null) checkbox.tint(accentColor) checkbox.isChecked = pref checkbox.jumpDrawablesToCurrentState() //Cancel the animation 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 83d886d..315d67b 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 @@ -25,7 +25,7 @@ open class KPrefColorPicker(val builder: KPrefColorContract) : KPrefItemBase(R.layout.kau_preference_color_preview) + val preview = viewHolder.bindInnerView(R.layout.kau_pref_color) preview.setBackgroundColor(pref) preview.withBorder = true builder.apply { 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 e0eb37a..6f565ae 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 @@ -11,7 +11,7 @@ import ca.allanwang.kau.kpref.activity.R */ open class KPrefHeader(builder: CoreContract) : KPrefItemCore(builder) { - override fun getLayoutRes(): Int = R.layout.kau_preference_header + override fun getLayoutRes(): Int = R.layout.kau_pref_header override fun onPostBindView(viewHolder: ViewHolder, textColor: Int?, accentColor: Int?) { if (accentColor != null) viewHolder.title.setTextColor(accentColor) 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 e21d483..c3f0290 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 @@ -53,7 +53,7 @@ abstract class KPrefItemBase(val base: BaseContract) : KPrefItemCore(base) } } - override final fun getLayoutRes(): Int = R.layout.kau_preference + override final fun getLayoutRes(): Int = R.layout.kau_pref_core /** * Extension of the core contract 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 f1429e7..f161382 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 @@ -21,13 +21,13 @@ open class KPrefSeekbar(val builder: KPrefSeekbarContract) : KPrefItemBase( override fun onPostBindView(viewHolder: ViewHolder, textColor: Int?, accentColor: Int?) { super.onPostBindView(viewHolder, textColor, accentColor) - val text = viewHolder.bindInnerView(R.layout.kau_preference_seekbar_text) + val text = viewHolder.bindInnerView(R.layout.kau_pref_seekbar_text) if (textColor != null) text.setTextColor(textColor) val tvc = builder.textViewConfigs text.tvc() - val seekbar = viewHolder.bindLowerView(R.layout.kau_preference_seekbar) { + val seekbar = viewHolder.bindLowerView(R.layout.kau_pref_seekbar) { it.max = builder.range it.incrementProgressBy(builder.increments) it.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener { diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt index 9313a3f..1bf0ffc 100644 --- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt +++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt @@ -19,7 +19,7 @@ open class KPrefSubItems(val builder: KPrefSubItemsContract) : KPrefItemCore(bui return true } - override fun getLayoutRes(): Int = R.layout.kau_preference + override fun getLayoutRes(): Int = R.layout.kau_pref_core override fun onPostBindView(viewHolder: ViewHolder, textColor: Int?, accentColor: Int?) {} /** 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 277a842..45c9a5d 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 @@ -33,7 +33,7 @@ open class KPrefText(val builder: KPrefTextContract) : KPrefItemBase(bu override fun onPostBindView(viewHolder: ViewHolder, textColor: Int?, accentColor: Int?) { super.onPostBindView(viewHolder, textColor, accentColor) - val textview = viewHolder.bindInnerView(R.layout.kau_preference_text) + val textview = viewHolder.bindInnerView(R.layout.kau_pref_text) if (textColor != null) textview.setTextColor(textColor) textview.text = builder.textGetter.invoke(pref) } -- cgit v1.2.3