From 3ec4ce4524e13947df9fa7c14fb1c4a64381bc87 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 20 Oct 2020 20:56:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= 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 | 5 ++++- .../java/io/legado/app/ui/widget/text/AccentBgTextView.kt | 6 ++++-- 2 files changed, 8 insertions(+), 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 1711a650e..3c3c1d7c3 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 @@ -12,7 +12,10 @@ import androidx.appcompat.widget.AppCompatTextView import io.legado.app.utils.dp import java.io.File -class BatteryView(context: Context, attrs: AttributeSet?) : AppCompatTextView(context, attrs) { +class BatteryView @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null +) : AppCompatTextView(context, attrs) { private val batteryPaint = Paint() private val outFrame = Rect() private val polar = Rect() diff --git a/app/src/main/java/io/legado/app/ui/widget/text/AccentBgTextView.kt b/app/src/main/java/io/legado/app/ui/widget/text/AccentBgTextView.kt index 3d9df36f0..ccaffaf79 100644 --- a/app/src/main/java/io/legado/app/ui/widget/text/AccentBgTextView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/text/AccentBgTextView.kt @@ -11,8 +11,10 @@ import io.legado.app.utils.ColorUtils import io.legado.app.utils.dp import io.legado.app.utils.getCompatColor -class AccentBgTextView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : - AppCompatTextView(context, attrs) { +class AccentBgTextView @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null +) : AppCompatTextView(context, attrs) { private var radius = 0