feat: 优化代码

pull/103/head
kunfei 5 years ago
parent a4c584ae33
commit 55a8c594ef
  1. 6
      app/src/main/java/io/legado/app/lib/theme/prefs/ATEPreferenceCategory.kt

@ -15,8 +15,10 @@ class ATEPreferenceCategory(context: Context, attrs: AttributeSet) :
super.onBindViewHolder(holder) super.onBindViewHolder(holder)
holder?.let { holder?.let {
val view = it.findViewById(android.R.id.title) val view = it.findViewById(android.R.id.title)
if (view is TextView) { if (!view.isInEditMode) {
view.setTextColor(context.accentColor)//设置title文本的颜色 if (view is TextView) {
view.setTextColor(context.accentColor)//设置title文本的颜色
}
} }
} }
} }

Loading…
Cancel
Save