improve detekt score

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2020-10-21 23:05:11 +02:00
parent 711b2334b0
commit 9741cf21c9
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -32,9 +32,11 @@ import androidx.core.graphics.drawable.RoundedBitmapDrawable
class AvatarWithStatus(val roundedBitmapDrawable: RoundedBitmapDrawable) : Drawable() {
private val redPaint: Paint = Paint().apply { setARGB(255, 255, 0, 0) }
private val avatarSize = 100
override fun draw(canvas: Canvas) {
val width = 100
val height = 100
val width = avatarSize
val height = avatarSize
val radius: Float = Math.min(width, height).toFloat() / 2f
// Draw a red circle in the center