From 66777624ccf4b78d897f014b78526b66e9f53e74 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 25 Mar 2020 22:45:04 +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 --- .../java/io/legado/app/ui/widget/prefs/Preference.kt | 8 -------- app/src/main/res/drawable/bg_prefs_color.xml | 12 +++--------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt b/app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt index 5e87ed3dd..2ebb11344 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt +++ b/app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt @@ -1,7 +1,6 @@ package io.legado.app.ui.widget.prefs import android.content.Context -import android.graphics.drawable.ColorDrawable import android.graphics.drawable.Drawable import android.util.AttributeSet import android.view.LayoutInflater @@ -12,10 +11,7 @@ import android.widget.TextView import androidx.core.view.isVisible import androidx.preference.PreferenceViewHolder import io.legado.app.R -import io.legado.app.lib.theme.Selector import io.legado.app.lib.theme.accentColor -import io.legado.app.lib.theme.backgroundColor -import io.legado.app.utils.getCompatColor import org.jetbrains.anko.layoutInflater import kotlin.math.roundToInt @@ -41,10 +37,6 @@ class Preference(context: Context, attrs: AttributeSet) : weightHeight: Int = 0 ): T? { if (it == null) return null - it.itemView.background = Selector.drawableBuild() - .setDefaultDrawable(ColorDrawable(context.backgroundColor)) - .setPressedDrawable(ColorDrawable(context.getCompatColor(R.color.btn_bg_press))) - .create() val view = it.findViewById(R.id.preference_title) if (view is TextView) { view.text = title diff --git a/app/src/main/res/drawable/bg_prefs_color.xml b/app/src/main/res/drawable/bg_prefs_color.xml index ff4a5de4e..beb057eab 100644 --- a/app/src/main/res/drawable/bg_prefs_color.xml +++ b/app/src/main/res/drawable/bg_prefs_color.xml @@ -1,10 +1,4 @@ - - - - - - - - \ No newline at end of file + + + \ No newline at end of file