优化
This commit is contained in:
@@ -24,7 +24,6 @@ class NameListPreference(context: Context, attrs: AttributeSet) : ListPreference
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||||
super.onBindViewHolder(holder)
|
|
||||||
val v = Preference.bindView<TextView>(
|
val v = Preference.bindView<TextView>(
|
||||||
context, holder, icon, title, summary, widgetLayoutResource,
|
context, holder, icon, title, summary, widgetLayoutResource,
|
||||||
R.id.text_view, isBottomBackground = isBottomBackground
|
R.id.text_view, isBottomBackground = isBottomBackground
|
||||||
@@ -37,6 +36,7 @@ class NameListPreference(context: Context, attrs: AttributeSet) : ListPreference
|
|||||||
v.setTextColor(pTextColor)
|
v.setTextColor(pTextColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
super.onBindViewHolder(holder)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -23,13 +23,8 @@ class SwitchPreference(context: Context, attrs: AttributeSet) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||||
|
|
||||||
val v = Preference.bindView<SwitchCompat>(
|
val v = Preference.bindView<SwitchCompat>(
|
||||||
context,
|
context, holder, icon, title, summary,
|
||||||
holder,
|
|
||||||
icon,
|
|
||||||
title,
|
|
||||||
summary,
|
|
||||||
widgetLayoutResource,
|
widgetLayoutResource,
|
||||||
androidx.preference.R.id.switchWidget,
|
androidx.preference.R.id.switchWidget,
|
||||||
isBottomBackground = isBottomBackground
|
isBottomBackground = isBottomBackground
|
||||||
|
|||||||
Reference in New Issue
Block a user