From 55a8c594ef16850850922f0e05dc23dd2f8c5439 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 15 Feb 2020 19:41:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/lib/theme/prefs/ATEPreferenceCategory.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/lib/theme/prefs/ATEPreferenceCategory.kt b/app/src/main/java/io/legado/app/lib/theme/prefs/ATEPreferenceCategory.kt index 7d5a704c3..bfd000aa3 100644 --- a/app/src/main/java/io/legado/app/lib/theme/prefs/ATEPreferenceCategory.kt +++ b/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) holder?.let { val view = it.findViewById(android.R.id.title) - if (view is TextView) { - view.setTextColor(context.accentColor)//设置title文本的颜色 + if (!view.isInEditMode) { + if (view is TextView) { + view.setTextColor(context.accentColor)//设置title文本的颜色 + } } } }