diff --git a/app/src/main/java/io/legado/app/lib/theme/TintHelper.kt b/app/src/main/java/io/legado/app/lib/theme/TintHelper.kt index b7b042ebc..8346e2525 100644 --- a/app/src/main/java/io/legado/app/lib/theme/TintHelper.kt +++ b/app/src/main/java/io/legado/app/lib/theme/TintHelper.kt @@ -317,18 +317,15 @@ object TintHelper { color ) ) - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - box.buttonTintList = sl - } else { - val drawable = - createTintedDrawable( - ContextCompat.getDrawable( - box.context, - R.drawable.abc_btn_check_material - ), sl - ) - box.buttonDrawable = drawable - } + box.buttonTintList = sl + val drawable = + createTintedDrawable( + ContextCompat.getDrawable( + box.context, + R.drawable.abc_btn_check_material + ), sl + ) + box.buttonDrawable = drawable } fun setTint(image: ImageView, @ColorInt color: Int) { diff --git a/app/src/main/java/io/legado/app/lib/theme/view/ATECheckBox.kt b/app/src/main/java/io/legado/app/lib/theme/view/ATECheckBox.kt index a9bef21b0..f910115df 100644 --- a/app/src/main/java/io/legado/app/lib/theme/view/ATECheckBox.kt +++ b/app/src/main/java/io/legado/app/lib/theme/view/ATECheckBox.kt @@ -4,7 +4,7 @@ import android.content.Context import android.util.AttributeSet import androidx.appcompat.widget.AppCompatCheckBox import io.legado.app.lib.theme.ATH -import io.legado.app.lib.theme.ThemeStore +import io.legado.app.lib.theme.accentColor /** * @author Aidan Follestad (afollestad) @@ -22,6 +22,6 @@ class ATECheckBox : AppCompatCheckBox { ) init { - ATH.setTint(this, ThemeStore.accentColor(context)) + ATH.setTint(this, context.accentColor) } }