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