diff --git a/app/src/main/assets/number.ttf b/app/src/main/assets/font/number.ttf similarity index 100% rename from app/src/main/assets/number.ttf rename to app/src/main/assets/font/number.ttf 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 3141c5a86..1711a650e 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 @@ -10,6 +10,7 @@ import android.util.AttributeSet import androidx.annotation.ColorInt import androidx.appcompat.widget.AppCompatTextView import io.legado.app.utils.dp +import java.io.File class BatteryView(context: Context, attrs: AttributeSet?) : AppCompatTextView(context, attrs) { private val batteryPaint = Paint() @@ -22,7 +23,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") + typeface = Typeface.createFromAsset(context.assets, "font${File.separator}number.ttf") } fun setColor(@ColorInt color: Int) {