aboutsummaryrefslogtreecommitdiff
path: root/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt
diff options
context:
space:
mode:
Diffstat (limited to 'kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt')
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt9
1 files changed, 4 insertions, 5 deletions
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 7c2979c..5d5db96 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
@@ -14,9 +14,8 @@ import ca.allanwang.kau.kpref.activity.R
*/
open class KPrefSubItems(open val builder: KPrefSubItemsContract) : KPrefItemCore(builder) {
- override fun onClick(itemView: View, innerContent: View?): Boolean {
- builder.globalOptions.showNextPrefs(builder.titleRes, builder.itemBuilder)
- return true
+ override fun onClick(itemView: View) {
+ builder.globalOptions.showNextPrefs(builder.titleFun(), builder.itemBuilder)
}
override fun getLayoutRes(): Int = R.layout.kau_pref_core
@@ -34,9 +33,9 @@ open class KPrefSubItems(open val builder: KPrefSubItemsContract) : KPrefItemCor
*/
class KPrefSubItemsBuilder(
globalOptions: GlobalOptions,
- titleRes: Int,
+ titleId: Int,
override val itemBuilder: KPrefAdapterBuilder.() -> Unit
- ) : KPrefSubItemsContract, CoreContract by CoreBuilder(globalOptions, titleRes)
+ ) : KPrefSubItemsContract, CoreContract by CoreBuilder(globalOptions, titleId)
override fun getType(): Int = R.id.kau_item_pref_sub_item