@ -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()
@ -11,8 +11,10 @@ import io.legado.app.utils.ColorUtils
import io.legado.app.utils.getCompatColor
class AccentBgTextView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
AppCompatTextView(context, attrs) {
class AccentBgTextView @JvmOverloads constructor(
private var radius = 0