From 0b0244d72697a8ffe09c19b98eb363975c0b48fe Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 2 Oct 2019 18:40:52 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/widget/image/FilletImageView.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/image/FilletImageView.kt b/app/src/main/java/io/legado/app/ui/widget/image/FilletImageView.kt index d1c50fb31..bcb449329 100644 --- a/app/src/main/java/io/legado/app/ui/widget/image/FilletImageView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/image/FilletImageView.kt @@ -7,6 +7,7 @@ import android.graphics.Path import android.util.AttributeSet import androidx.appcompat.widget.AppCompatImageView import io.legado.app.R +import io.legado.app.utils.dp import kotlin.math.max class FilletImageView : AppCompatImageView { @@ -30,7 +31,7 @@ class FilletImageView : AppCompatImageView { private fun init(context: Context, attrs: AttributeSet) { // 读取配置 val array = context.obtainStyledAttributes(attrs, R.styleable.FilletImageView) - val defaultRadius = 5 + val defaultRadius = 5.dp val radius = array.getDimensionPixelOffset(R.styleable.FilletImageView_radius, defaultRadius) leftTopRadius = array.getDimensionPixelOffset(R.styleable.FilletImageView_left_top_radius, defaultRadius) rightTopRadius = array.getDimensionPixelOffset(R.styleable.FilletImageView_right_top_radius, defaultRadius)