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