From b2f7eb45a56bd2bd0a785fa09e1985dc690286bf Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 28 Aug 2020 15:43:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E7=94=B5=E6=B1=A0=E5=AD=97?= =?UTF-8?q?=E4=BD=93?= 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 | 2 ++ 1 file changed, 2 insertions(+) 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 d9725f019..3141c5a86 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 @@ -5,6 +5,7 @@ import android.content.Context import android.graphics.Canvas import android.graphics.Paint import android.graphics.Rect +import android.graphics.Typeface import android.util.AttributeSet import androidx.annotation.ColorInt import androidx.appcompat.widget.AppCompatTextView @@ -21,6 +22,7 @@ class BatteryView(context: Context, attrs: AttributeSet?) : AppCompatTextView(co batteryPaint.strokeWidth = 1.dp.toFloat() batteryPaint.isAntiAlias = true batteryPaint.color = paint.color + typeface = Typeface.createFromAsset(context.assets, "number.ttf") } fun setColor(@ColorInt color: Int) {