pull/433/head
gedoor 4 years ago
parent 8051cc8d81
commit 3ec4ce4524
  1. 5
      app/src/main/java/io/legado/app/ui/widget/BatteryView.kt
  2. 6
      app/src/main/java/io/legado/app/ui/widget/text/AccentBgTextView.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()

@ -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

Loading…
Cancel
Save