pull/70/head
kunfei 5 years ago
parent 530c9b176d
commit f5873c6070
  1. 14
      app/src/main/java/io/legado/app/ui/widget/BadgeView.kt

@ -108,17 +108,9 @@ class BadgeView @JvmOverloads constructor(
}
fun setBackground(dipRadius: Float, badgeColor: Int) {
val radius = dip2Px(dipRadius)
val radiusArray = floatArrayOf(
radius.toFloat(),
radius.toFloat(),
radius.toFloat(),
radius.toFloat(),
radius.toFloat(),
radius.toFloat(),
radius.toFloat(),
radius.toFloat()
)
val radius = dip2Px(dipRadius).toFloat()
val radiusArray =
floatArrayOf(radius, radius, radius, radius, radius, radius, radius, radius)
val roundRect = RoundRectShape(radiusArray, null, null)
val bgDrawable = ShapeDrawable(roundRect)

Loading…
Cancel
Save