更新界面

This commit is contained in:
HapeLee committed 2025-07-04 15:23:28 +08:00
1 parent ea36e85899
commit 9f5a0eb483
36 files changed
+1358 -974

No files matched your search

@@ -18,7 +18,6 @@ class NameListPreference(context: Context, attrs: AttributeSet) : ListPreference
init {
layoutResource = R.layout.view_preference
widgetLayoutResource = R.layout.item_fillet_text
context.withStyledAttributes(attrs, R.styleable.Preference) {
isBottomBackground = getBoolean(R.styleable.Preference_isBottomBackground, false)
}
@@ -26,16 +25,16 @@ class NameListPreference(context: Context, attrs: AttributeSet) : ListPreference
override fun onBindViewHolder(holder: PreferenceViewHolder) {
val v = Preference.bindView<TextView>(
context, holder, icon, title, summary, widgetLayoutResource,
context, holder, icon, title, entry,
R.id.text_view, isBottomBackground = isBottomBackground
)
if (v is TextView) {
v.text = entry
if (isBottomBackground) {
// if (isBottomBackground) {
// val bgColor = context.bottomBackground
// val pTextColor = context.getPrimaryTextColor(ColorUtils.isColorLight(bgColor))
//v.setTextColor(pTextColor)
}
// val pTextColor = context.getPrimaryTextColor(ColorUtils.isColorLight(bgColor))
// //v.setTextColor(pTextColor)
// }
}
super.onBindViewHolder(holder)
}