pull/1649/head
kunfei 3 years ago
parent 60aebdcea9
commit dfce15322d
  1. 2
      app/src/main/java/io/legado/app/ui/widget/BatteryView.kt
  2. 2
      build.gradle

@ -67,7 +67,7 @@ class BatteryView @JvmOverloads constructor(
layout.getLineBounds(0, outFrame) layout.getLineBounds(0, outFrame)
val batteryStart = layout val batteryStart = layout
.getPrimaryHorizontal(text.length - battery.toString().length) .getPrimaryHorizontal(text.length - battery.toString().length)
.toInt() + 3.dp .toInt() + 2.dp
val batteryEnd = val batteryEnd =
batteryStart + StaticLayout.getDesiredWidth(battery.toString(), paint).toInt() + 4.dp batteryStart + StaticLayout.getDesiredWidth(battery.toString(), paint).toInt() + 4.dp
outFrame.set( outFrame.set(

@ -13,7 +13,7 @@ buildscript {
//maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } //maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.1.1' classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.4' classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.4'
classpath 'de.undercouch:gradle-download-task:4.1.2' classpath 'de.undercouch:gradle-download-task:4.1.2'

Loading…
Cancel
Save