From 6d3143e8d291be9a923a84dbf75fba9156ff3fdd Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 10 Sep 2020 16:40:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=BB=E9=A2=98=E9=A2=9C?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/widget/prefs/NameListPreference.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt b/app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt index c83ea7433..bb1e5d791 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt +++ b/app/src/main/java/io/legado/app/ui/widget/prefs/NameListPreference.kt @@ -36,9 +36,11 @@ class NameListPreference(context: Context, attrs: AttributeSet) : ListPreference ) if (v is TextView) { v.text = entry - val bgColor = context.bottomBackground - val pTextColor = context.getPrimaryTextColor(ColorUtils.isColorLight(bgColor)) - v.setTextColor(pTextColor) + if (isBottomBackground) { + val bgColor = context.bottomBackground + val pTextColor = context.getPrimaryTextColor(ColorUtils.isColorLight(bgColor)) + v.setTextColor(pTextColor) + } } super.onBindViewHolder(holder) }