From 6a5d38131467504615a69f467107e80e61f76fde Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 9 Mar 2020 09:41:20 +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 --- app/src/main/java/io/legado/app/ui/widget/BatteryView.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/BatteryView.kt b/app/src/main/java/io/legado/app/ui/widget/BatteryView.kt index 1cae8e09d..a51e250f7 100644 --- a/app/src/main/java/io/legado/app/ui/widget/BatteryView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/BatteryView.kt @@ -8,9 +8,7 @@ import android.graphics.Rect import android.util.AttributeSet import androidx.annotation.ColorInt import androidx.appcompat.widget.AppCompatTextView -import io.legado.app.R import io.legado.app.utils.dp -import io.legado.app.utils.getCompatColor class BatteryView(context: Context, attrs: AttributeSet?) : AppCompatTextView(context, attrs) { private val batteryPaint = Paint() @@ -21,7 +19,7 @@ class BatteryView(context: Context, attrs: AttributeSet?) : AppCompatTextView(co setPadding(4.dp, 0, 6.dp, 0) batteryPaint.strokeWidth = 1.dp.toFloat() batteryPaint.isAntiAlias = true - batteryPaint.color = context.getCompatColor(R.color.tv_text_default) + batteryPaint.color = paint.color } fun setColor(@ColorInt color: Int) {